Глава 53. Центр оперативного контроля

PPEM поддерживает центр оперативного контроля, с помощью которого можно просматривать состояние кластеров и экземпляров, а также при необходимости устранять неполадки.

Чтобы просмотреть состояние кластеров или экземпляров с помощью центра оперативного контроля:

  1. В навигационной панели перейдите в Мониторинг → Центр оперативного контроля.

  2. В зависимости от того, что вы хотите просмотреть, переключитесь на вкладку Кластеры или Экземпляры.

Отобразится страница центра оперативного контроля. Вверху страницы содержатся плитки кластеров или экземпляров, а внизу — график с метриками. График отображается, только если выбрана плитка кластера или экземпляра.

53.1. Использование плиток #

Кластеры и экземпляры отображаются в виде плиток.

На каждой плитке отображается следующая информация:

  • Для кластера:

    • Имя.

    • Тип кластера: обычный, BiHA или Patroni.

    • Общее число узлов в кластере.

    • Число исправных узлов в кластере.

    • Минимальное число исправных узлов в кластере, при котором он также считается исправным.

  • Для экземпляра:

    • Время непрерывной работы.

    • Имя экземпляра.

    • Имя сервера, на котором находится экземпляр.

Цвет плитки позволяет быстро определить состояние соответствующего кластера или экземпляра:

  • : исправен, штатная работа.

  • : предупреждение, требует повышенного внимания.

  • : неисправен, работа нарушена.

  • : статус неизвестен.

С помощью плиток можно выполнить следующие действия:

  • Чтобы посмотреть детальную информацию, наведите курсор на плитку.

  • Чтобы посмотреть график с метриками, нажмите на плитку.

  • Чтобы перейти на страницу кластера или экземпляра, нажмите → Перейти к кластеру или Перейти к экземпляру соответственно.

  • Чтобы открыть терминал psql для кластера или экземпляра, нажмите → Открыть PSQL-консоль.

    Для кластера отображается имя лидера/ведущего узла, к которому будет выполнено подключение.

  • Чтобы переключить кластер на нового лидера или на новый ведущий узел, нажмите → Переключить лидера или Переключить главный узел соответственно.

  • Чтобы запустить остановленный экземпляр, нажмите → Запустить экземпляр.

53.2. Использование графика с метриками #

График с метриками основан на метриках, собранных pgpro-otel-collector, и позволяет отслеживать ключевые показатели работы.

Для работы графика необходимо предварительно установить и настроить средства журналирования и мониторинга.

Чтобы отобразить график с метриками для кластера или экземпляра, нажмите на соответствующую плитку. При необходимости выберите другой график из выпадающего списка в правом верхнем углу графика.

Доступны следующие графики с метриками:

  • Для кластера:

    • Streaming Replication: Lag, bytes: отставание данных в байтах между главным узлом / узлом-лидером и резервным узлом / узлом-последователем.

    • Streaming Replication: Lag, time: время отставания в секундах между главным узлом / узлом-лидером и резервными узлами / узлами-последователями.

  • Для экземпляра:

    • Instance: Connections: соединения, установленные с экземпляром СУБД, и их состояние.

    • Instance: Blocks rate: количество попаданий в кеш и промахов, которые привели к необходимости чтения данных с диска.

    • Instance: Transactions rate: транзакционная активность в экземпляре СУБД.

    • Instance: Events: взаимоблокировки, конфликты репликации и ошибки проверки контрольных сумм в экземпляре СУБД.

    • Instance: Tuples: количество прочитанных, вставленных, изменённых и удалённых строк.

    • Instance: Cache hit ratio: доля попаданий в кеш относительно всех обращений к общему кешу.

    • Instance: Temp Bytes Written: объём записи во временные файлы.

    • Instance: Temp Files: количество временных файлов, записанных экземпляром СУБД.

    • Instance: Locks: динамика блокировок.

    • Instance: Wait Events Types: Количество событий ожидания, сгруппированных по типу.

      На этом графике не отображаются события ожидания ClientRead и Extension, а также события ожидания типов Activity и Timeout.

    • Instance: Wait Events: количество событий ожидания.

      На этом графике не отображаются события ожидания ClientRead и Extension, а также события ожидания типов Activity и Timeout.

С помощью графика можно выполнить следующие действия:

  • Выбрать другой график с метриками из выпадающего списка в правом верхнем углу графика.

  • Выбрать или указать период времени, выполнив одно из следующих действий:

    • В правом верхнем углу графика укажите другой период времени или выберите его из выпадающего списка.

    • В правом верхнем углу графика нажмите . Затем внутри графика, зажав левую кнопку мыши, выделите горизонтальную область, которая соответствует нужному периоду времени.

    График масштабируется в соответствии с выбранным периодом времени. Чтобы сбросить масштаб к значению, которое соответствует периоду времени, указанному в выпадающем списке, в правом верхнем углу графика нажмите .

  • Загрузите график в формате PNG или CSV, нажав или в правом верхнем углу графика.

Chapter 53. Control Center

PPEM supports the control center that you can use for monitoring the state of clusters and instances, as well as troubleshooting them if required.

To view the state of clusters or instances using control center:

  1. In the navigation panel, go to Monitoring → Operation control center.

  2. Depending on what you want to view, switch to the Clusters or Instances tab.

The control center page will be displayed. It contains cluster or instance tiles at the top, and the metrics chart at the bottom. The chart is not shown if no cluster or instance tile is selected.

Using Tiles #

Clusters and instances are displayed as tiles.

Each tile displays the following information:

  • For a cluster:

    • Name.

    • The cluster type: regular, BiHA, or Patroni.

    • Total number of nodes in the cluster.

    • The number of healthy nodes in the cluster.

    • The minimum number of healthy nodes in the cluster for it to be considered healthy.

  • For an instance:

    • Uptime.

    • Name of the instance.

    • Name of the server where the instance is located.

The color of a tile allows you to quickly determine the health status of the related cluster or instance:

  • : healthy, normal operation

  • : warning, pay attention

  • : unhealthy, disrupted operation

  • : unknown

You can perform the following actions using tiles:

  • To view the detailed information, hover over a tile.

  • To view the metrics chart, click a tile.

  • To go to the page of a cluster or instance, click → Go to cluster or Go to instance, respectively.

  • To open the psql terminal for a cluster or instance, click → Open PSQL terminal or Open PSQL-console, respectively.

    For a cluster, the name of the leader/primary node to be connected to is displayed.

  • To switch over a cluster to a new leader/primary node, click → Switch over to a new leader or Switch over to a new primary node, respectively.

  • To start a stopped instance, click → Start instance.

Using the Metrics Graph #

The metrics chart is based on metrics collected by pgpro-otel-collector and allows monitoring key instance performance indicators.

For the chart to work properly, you must first install and configure logging and monitoring tools.

To display the metrics chart for a cluster or instance, click the related tile. Optionally, select another chart from the drop-down list in top-right corner of a chart.

The following metrics charts are available:

  • For a cluster:

    • Streaming Replication: Lag, bytes: The data lag between the primary/leader and the standby/follower node, in bytes.

    • Streaming Replication: Lag, time: The time lag between the primary/leader and the standby/follower node, in seconds.

  • For an instance:

    • Instance: Connections: Connections established with the DBMS instance and their state.

    • Instance: Blocks rate: The number of cache hits and misses that resulted in the need to read data from disk.

    • Instance: Transactions rate: Transactional activity in the DBMS instance.

    • Instance: Events: Deadlocks, replication conflicts, and checksum validation errors in the DBMS instance.

    • Instance: Tuples: The number of rows read, inserted, updated, and deleted.

    • Instance: Cache hit ratio: The proportion of cache hits relative to all shared cache accesses.

    • Instance: Temp Bytes Written: The amount of data written to temporary files.

    • Instance: Temp Files: The number of temporary files written by the DBMS instance.

    • Instance: Locks: Lock dynamics.

    • Instance: Wait Events Types: The count of wait events, grouped by type.

      The ClientRead and Extension wait events, as well as the wait events of Activity and Timeout types, are not displayed in this chart.

    • Instance: Wait Events: The count of wait events.

      The ClientRead and Extension wait events, as well as the wait events of Activity and Timeout types, are not displayed in this chart.

You can perform the following actions using the chart:

  • Select a different metrics chart from the drop-down list in the top-right corner of the chart.

  • Select or specify a time period of interest by performing one of the following actions:

    • In the top-right corner of the chart, specify a time period or select it from the drop-down list.

    • In the top-right corner of the chart, click . Then, inside the chart, press the left mouse button and drag the cursor to select a horizontal area that represents a time period of interest.

    The chart is scaled in accordance with the selected time interval. To reset the chart scale factor to the one listed in the drop-down list, in the top-right corner of the chart, click .

  • Download the chart in the PNG or CSV format by clicking or , respectively, in the top-right corner of the chart.

FAQ