1.2. Компоненты pgpro-otel-collector #

В этом разделе описаны входящие в pgpro-otel-collector компоненты.

Каждый компонент, в зависимости от его типа, нужно добавить в раздел receivers, processors или exporters соответственно, и, при необходимости, настроить. Конфигурация компонентов зависит от настройки экземпляра СУБД и используемого формата журнала (см. параметры logging_collector и log_destination).

1.2.1. Ресиверы #

1.2.1.1. postgrespro #

Ресивер postgrespro — главный компонент коллектора, заключающий в себе все инструменты (встроенные плагины) для сбора данных с экземпляра СУБД. Данный ресивер является внутренней разработкой компании Postgres Pro и не является частью открытой экосистемы OpenTelemetry.

Ресивер организован по модульному принципу и позволяет регулировать объём собираемых данных через включение модулей. Некоторые модули предусматривают дополнительную настройку.

Плагины — это внутренние компоненты ресивера, отвечающие за сбор разных типов статистических данных. Каждый плагин предназначен для сбора конкретной информации, которая затем преобразуется в группы метрик. Все группы метрик перечислены в Главе 4.

pgpro-otel-collector предоставляет группы метрик, описывающие различные подсистемы, события и процессы внутри системы управления базами данных (СУБД), такие как использование таблиц и индексов, работа фоновых процессов, использование ресурсов запросами и т. д.

Количество статистических данных может варьироваться в зависимости от версии и редакции Postgres Pro, что ведёт к большой вариативности и сложности методов сбора. Ещё одна важная роль pgpro-otel-collector — скрывать эти отличия от систем мониторинга, в то же время предоставляя максимум информации о базе данных.

1.2.1.1.1. Плагины postgrespro #

Ресивер postgrespro содержит следующие плагины:

activity #

Извлекает информацию об общей активности в экземпляре из представления pg_stat_activity.

См. раздел Метрики активности.

archiver #

Извлекает статистику архивирования журнала предзаписи (WAL) из представления pg_stat_archiver.

См. раздел Метрики архивирования WAL.

bgwriter #

Извлекает статистику процессов фоновой записи и контрольных точек из представления pg_stat_bgwriter.

См. раздел Метрики фоновой записи.

biha #

Извлекает статистику узлов BiHA-кластера из представлений biha.status_v и biha.nodes_v.

См. раздел Метрики BiHA.

bloat_indexes #

Извлекает информацию о раздувании индексов.

См. раздел Метрики раздувания таблиц и индексов.

bloat_tables #

Извлекает информацию о раздувании таблиц.

См. раздел Метрики раздувания таблиц и индексов.

buffercache #

Отслеживает использование общего кеша (требуется расширение pg_buffercache).

См. раздел Метрики использования общего кеша.

cache #

Собирает статистику использования кеша из представления pg_stat_database.

См. раздел Метрики использования баз данных.

checkpointer #

Извлекает данные об активности процесса контрольных точек кластера из представления pg_stat_checkpointer.

См. раздел Метрики фоновой записи.

cfs #

Отслеживает использование CFS (Compressed File System, сжатая файловая система) (доступно только в Postgres Pro Enterprise).

См. раздел Метрики CFS.

databases #

Извлекает статистику использования баз данных из представления pg_stat_database.

См. раздел Метрики использования баз данных.

functions #

Извлекает статистику применения пользовательских функций из представления pg_stat_user_functions.

См. раздел Метрики использования пользовательских функций.

health #

Извлекает статистические данные, относящиеся к работоспособности системы, такие как время непрерывной работы (uptime).

См. раздел Прочие метрики.

indexes #

Извлекает статистику использования индексов из представлений pg_stat_user_indexes и pg_statio_user_indexes.

См. раздел Метрики использования индексов.

io #

Извлекает статистику операций ввода-вывода на уровне таблиц из представления pg_stat_io.

См. раздел Метрики использования ввода-вывода.

locks #

Извлекает информацию о состояниях блокировки и ожидания из представления pg_locks.

См. раздел Метрики блокировок.

logs #

Собирает статистику журналов (например, размер каталога журналов) с помощью функции pg_ls_logdir().

См. раздел Прочие метрики.

pg_stat_slru #

Собирает статистику SLRU-кешей (simple least-recently-used, простое вытеснение давно не используемых) из представления pg_stat_slru.

См. раздел Прочие метрики.

pgpro_statements_generic #

Собирает общую статистику из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_inval_msgs #

Собирает информацию о количестве сообщений об аннулировании кеша из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_jit #

Собирает статистику использования JIT-компилятора операторами из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_local_io #

Собирает статистику использования локального кеша операторами из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_parallel #

Собирает статистику по параллельному выполнению из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_planning #

Собирает статистику по времени планирования операторов из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_plans #

Собирает тексты планов запросов из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_queries #

Извлекает информацию о текстах операторов из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_rusage #

Собирает статистику использования ресурсов при планировании и выполнении операторов из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_shared_io #

Собирает статистику использования разделяемого буфера операторами из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_temp_io #

Собирает статистику использования временных файлов операторами из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_timing #

Собирает статистику по времени выполнения операторов из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_wait_stats #

Собирает статистику по событиям ожидания для каждого выполнения запроса из представления pgpro_stats_statements (требует расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

pgpro_statements_wal #

Собирает статистику по количеству записей, добавляемых операторами в WAL, из представления pgpro_stats_statements (требуется расширение pgpro_stats).

См. раздел Метрики по SQL-запросам и операторам.

prepared_transactions #

Извлекает статистику подготовленных транзакций из представления pg_prepared_xacts.

См. раздел Метрики подготовленных транзакций.

recovery #

Собирает статистику восстановления из представлений pg_stat_recovery_prefetch и pg_stat_database_conflicts.

См. раздел Метрики восстановления.

replication #

Извлекает метрики о ведомых узлах и потоковой репликации из представлений pg_stat_replication и pg_stat_wal_receiver.

См. раздел Метрики репликации.

replication_slots #

Извлекает статистику использования слотов репликации из представления pg_replication_slots.

См. раздел Метрики слотов репликации.

sequences #

Собирает статистику использования последовательностей из представления pg_sequences.

См. раздел Метрики последовательностей.

settings_info #

Собирает статистику параметров времени выполнения из представления pg_settings.

См. раздел Прочие метрики.

shardman_fast_path #

Собирает поузловую статистику Postgres Pro Shardman из локального представления shardman.pg_stat_fast_path.

См. раздел Метрики Postgres Pro Shardman.

shardman_gv_monitor #

Собирает статистику со всего кластера Postgres Pro Shardman из глобального представления shardman.gv_stat_monitor.

См. раздел Метрики Postgres Pro Shardman.

statements_generic #

Собирает общую статистику по операторам из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_timing #

Собирает статистику по времени выполнения операторов из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_parallel #

Собирает статистику по параллельному выполнению из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_planning #

Собирает статистику по времени планирования операторов из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_shared_io #

Собирает статистику использования разделяемого буфера операторами из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_local_io #

Собирает статистику использования локального кеша операторами из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_temp_io #

Собирает статистику использования временных файлов операторами из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_wal #

Собирает статистику по количеству записей, добавляемых операторами в WAL, из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_jit #

Собирает статистику по использованию JIT-компилятора операторами из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

statements_queries #

Извлекает информацию о текстах запросов из представления pg_stat_statements.

См. раздел Метрики по SQL-запросам и операторам.

subscription #

Собирает статистику подписок из представлений pg_stat_subscription и pg_stat_subscription_stats.

См. раздел Метрики подписок.

tables #

Извлекает статистику доступа и кортежей на уровне таблиц из представления pg_stat_all_tables.

См. раздел Метрики использования таблиц.

tables_io #

Извлекает статистику операций ввода-вывода на уровне таблиц из представления pg_statio_all_tables.

См. раздел Метрики использования таблиц.

tables_size #

Извлекает статистику размеров таблиц, куч (heap) и TOAST-частей из представления pg_tables.

См. раздел Метрики использования таблиц.

tables_vacuum #

Извлекает статистику операций очистки и анализа на уровне таблиц из представления pg_stat_all_tables.

См. раздел Метрики использования таблиц.

tablespaces #

Извлекает статистику по использованию табличных пространств.

См. раздел Метрики использования табличных пространств.

version #

Извлекает метрики с информацией о версии Postgres Pro.

См. раздел Прочие метрики.

wait_sampling #

Извлекает метрики на основе выборки по событиям ожидания (требуется расширение pg_wait_sampling).

См. раздел Метрики событий ожидания.

wal #

Собирает статистику по количеству записей, добавляемых экземпляром в WAL, из представления pg_stat_wal.

См. раздел Метрики использования табличных пространств.

Предупреждение

Включение дополнительных плагинов может создавать высокую нагрузку на экземпляр СУБД, поэтому должно быть тщательно продумано.

Следующие плагины выключены по умолчанию:

  • bloat_indexes и bloat_tables. Процедура оценки раздувания ресурсоёмкая и в случае большого количества таблиц может создавать избыточную нагрузку. Рекомендуется ограничивать сбор данных отдельными базами данных, схемами или даже таблицами. Кроме того, данные о раздувании изменяются редко и могут содержать погрешности, поэтому рекомендуется устанавливать длительный интервал между сборами данных — например, 5 минут или более.

  • indexes и tables. Таблицы и индексы содержат большое количество статистических данных. При наличии множества таблиц и индексов может генерироваться значительный объём метрик, что может привести к проблемам с производительностью при записи в хранилище метрик. Кроме того, не все эти метрики представляют ценность для пользователя. Рекомендуется ограничивать сбор данных, выбирая только определённые базы данных, схемы или таблицы.

  • statements. В зависимости от нагрузки на экземпляр СУБД, объём статистики по операторам SQL может быть очень большим. Это может привести к генерации значительного количества метрик и нагрузке на запись в хранилище метрик. В силу своей специфичности, статистика операторов не всегда представляет ценность для пользователя. Рекомендуется включать только те плагины, которые действительно полезны в вашем сценарии использования.

  • statements_queries. В зависимости от длины запросов в статистике операторов, метрики могут вызывать значительные накладные расходы при записи и хранении в хранилище метрик. Рекомендуется настроить коллектор для ограничения максимальной длины значений в метриках.

1.2.1.2. file_log #

Важно

filelog переименован в file_log в соответствии с конвенцией именования компонентов. Устаревший псевдоним по-прежнему поддерживается, но будет полностью удалён в будущих выпусках, и при его использовании выводятся предупреждения. Обновите конфигурацию.

Ресивер file_log — компонент OpenTelemetry Collector с открытым исходным кодом для сбора журналов активности экземпляра СУБД. Коллектор поддерживает сбор журналов в формате CSV и JSON.

1.2.1.3. host_metrics #

Важно

hostmetrics переименован в host_metrics в соответствии с конвенцией именования компонентов. Устаревший псевдоним по-прежнему поддерживается, но будет полностью удалён в будущих выпусках, и при его использовании выводятся предупреждения. Обновите конфигурацию.

Ресивер host_metrics — компонент OpenTelemetry Collector с открытым исходным кодом для сбора метрик операционной системы (могут потребоваться права root).

1.2.1.4. journald #

Ресивер journald — компонент OpenTelemetry Collector с открытым исходным кодом для сбора записей журнала systemd, что особенно полезно для Postgres Pro Shardman и Postgres Pro Enterprise Manager (PPEM).

1.2.1.5. otlp #

Ресивер otlp — компонент OpenTelemetry Collector с открытым исходным кодом для сбора данных в формате OTLP (OpenTelemetry Protocol). Он особенно полезен при работе с Postgres ProGate.

1.2.1.6. sqlquery #

Ресивер sqlquery — компонент OpenTelemetry Collector с открытым исходным кодом для сбора метрик и/или журналов из пользовательских SQL-запросов.

Предупреждение

В настоящее время ресивер sqlquery является экспериментальным и не рекомендован для использования в производственной среде.

1.2.2. Процессоры #

1.2.2.1. attributes #

Процессор attributes — компонент OpenTelemetry Collector с открытым исходным кодом для обработки отдельных атрибутов записей журнала.

1.2.2.2. resource #

Процессор resource — компонент OpenTelemetry Collector с открытым исходным кодом для добавления дополнительных атрибутов записей журнала.

1.2.2.3. batch #

Процессор batch — компонент OpenTelemetry Collector с открытым исходным кодом для формирования пакетов данных и регулировки механизма отправки данных.

1.2.2.4. transform #

Процессор transform — компонент OpenTelemetry Collector с открытым исходным кодом для изменения телеметрических данных с помощью языка преобразований OpenTelemetry (OTTL).

1.2.2.5. memory_limiter #

Процессор memory_limiter — компонент OpenTelemetry Collector с открытым исходным кодом для ограничения потребления памяти, что позволяет избежать ошибок нехватки памяти.

1.2.2.6. filter #

Процессор filter — это компонент OpenTelemetry Collector с открытым исходным кодом, который позволяет включать или исключать телеметрические данные на основе заданных условий.

1.2.2.7. metrics_transform #

Важно

metricstransform переименован в metrics_transform в соответствии с конвенцией именования компонентов. Устаревший псевдоним по-прежнему поддерживается, но будет полностью удалён в будущих выпусках, и при его использовании выводятся предупреждения. Обновите конфигурацию.

Процессор metrics_transform — это компонент OpenTelemetry Collector с открытым исходным кодом, который позволяет переименовывать метрики и управлять метками (добавлять, переименовывать, удалять), а также выполнять операции масштабирования и агрегирования.

1.2.3. Экспортёры #

1.2.3.1. prometheus #

Экспортёр prometheus — компонент OpenTelemetry Collector с открытым исходным кодом для отправки собранных метрик по встроенному HTTP-серверу и публикации их на странице /metrics в формате системы мониторинга Prometheus. Этот экспортёр наиболее простой в использовании — он не требует обязательной настройки внешних компонентов и может быть включён по умолчанию.

1.2.3.2. prometheus_remote_write #

Экспортёр prometheus_remote_write — компонент OpenTelemetry Collector с открытым исходным кодом для отправки метрик по протоколу удалённой записи в совместимые с Prometheus системы, включая Cortex, Mimir, Thanos и VictoriaMetrics.

1.2.3.3. otlp_http #

Важно

otlphttp переименован в otlp_http в соответствии с конвенцией именования компонентов. Устаревший псевдоним по-прежнему поддерживается, но будет полностью удалён в будущих выпусках, и при его использовании выводятся предупреждения. Обновите конфигурацию.

Экспортёр otlp_http — компонент OpenTelemetry Collector с открытым исходным кодом для отправки собранных метрик в OTLP-совместимую систему хранения или мониторинга, которая предварительно должна быть развёрнута и доступна. При этом используется протокол HTTP.

1.2.3.4. kafka #

Экспортёр kafka — компонент OpenTelemetry Collector с открытым исходным кодом для отправки метрик и журналов в Apache Kafka.

1.2.3.5. zabbix #

Экспортёр zabbix — это компонент коллектора для отправки метрик в Zabbix. За примерами использования обратитесь к Интеграция с Zabbix.

1.2. pgpro-otel-collector Components #

This section contains description of the components included in pgpro-otel-collector.

Each component, depending on its type, should be added to the receivers, processors, or exporters section accordingly, and configured if necessary. The component configuration depends on the database instance setup and the log format used (see the logging_collector and log_destination parameters).

1.2.1. Receivers #

1.2.1.1. postgrespro #

The postgrespro receiver is the central component of the collector, which contains the main implementation (built-in plugins) for collecting data from a database instance. This receiver is a product of Postgres Pro internal development and is not part of the open-source OpenTelemetry ecosystem.

The receiver is designed with a modular approach, allowing control over the volume of collected data by enabling specific plugins. Some plugins support additional configuration.

Plugins are internal components of a receiver responsible for collecting various types of statistical data. Each plugin is designed to collect specific information, which is then converted into metric groups. All metric groups are listed in Chapter 4.

pgpro-otel-collector provides metric groups that describe various subsystems, events, and processes within the database management system (DBMS), such as table and index usage, background processes, resource usage by queries, and more.

The amount of statistical data may vary depending on the Postgres Pro version and edition. This adds up to variability and complexity of collection methods. Another important role of pgpro-otel-collector is to abstract these differences from monitoring systems while providing comprehensive information about the database.

1.2.1.1.1. postgrespro Plugins #

The postgrespro receiver includes the following plugins:

activity #

Retrieves general activity in the instance from the pg_stat_activity view.

See the Activity Metrics section.

archiver #

Retrieves Write-Ahead Logging (WAL) archiving activity from the pg_stat_archiver view.

See the WAL Archiving Metrics section.

bgwriter #

Retrieves background writer and checkpointer process activity from the pg_stat_bgwriter view.

See the Background Record Metrics section.

biha #

Retrieves BiHA cluster node statistics from the biha.status_v and biha.nodes_v views.

See the BiHA Metrics section.

bloat_indexes #

Retrieves information about index bloat.

See the Table and Index Bloat Metrics section.

bloat_tables #

Retrieves information about table bloat.

See the Table and Index Bloat Metrics section.

buffercache #

Monitors shared cache usage (requires the pg_buffercache extension).

See the Shared Cache Usage Metrics section.

cache #

Collects cache usage statistics from the pg_stat_database view.

See the Database Usage Metrics section.

checkpointer #

Retrieves the cluster checkpointer process activity from the pg_stat_checkpointer view.

See the Background Record Metrics section.

cfs #

Monitors CFS (Compressed File System) compression usage (available in Postgres Pro Enterprise only).

See the CFS Metrics section.

databases #

Retrieves database usage statistics from the pg_stat_database view.

See the Database Usage Metrics section.

functions #

Retrieves user function usage statistics from the pg_stat_user_functions view.

See the User-Defined Function Usage Metrics section.

health #

Retrieves health-related statistics, for example, uptime.

See the Other Metrics section.

indexes #

Retrieves index usage statistics from the pg_stat_user_indexes and pg_statio_user_indexes views.

See the Index Usage Metrics section.

io #

Collects Input/Output (I/O) metrics from the pg_stat_io view.

See the I/O Usage Metrics section.

locks #

Retrieves lock and wait state information from the pg_locks view.

See the Lock Metrics section.

logs #

Collects log statistics (for example, log directory size) using the pg_ls_logdir() function.

See the Other Metrics section.

pg_stat_slru #

Collects SLRU (simple least-recently-used) cache statistics from the pg_stat_slru view.

See the Other Metrics section.

pgpro_statements_generic #

Collects general statistics from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_inval_msgs #

Gathers the number of cache invalidation messages from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_jit #

Collects statistics on Just-In-Time (JIT) compiler usage by statements from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_local_io #

Collects statistics on local cache usage by statements from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_parallel #

Collects parallel statistics from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_planning #

Collects statistics on statement planning time from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_plans #

Gathers plan texts from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_queries #

Retrieves information about statement texts from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_rusage #

Gathers resource usage statistics of the statement planning and execution from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_shared_io #

Collects statistics on shared buffer usage by statements from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_temp_io #

Collects statistics on temporary file usage by statements from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_timing #

Collects statistics on statement execution time from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_wait_stats #

Gathers statistics on wait events for each execution of the query from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

pgpro_statements_wal #

Collects statistics on the amount of WAL written by statements from the pgpro_stats_statements view (requires the pgpro_stats extension).

See the SQL Query and Statement Metrics section.

prepared_transactions #

Retrieves statistics on prepared transactions from the pg_prepared_xacts view.

See the Prepared Transaction Metrics section.

recovery #

Collects recovery statistics from the pg_stat_recovery_prefetch and pg_stat_database_conflicts views.

See the Recovery Metrics section.

replication #

Retrieves metrics about standby nodes and streaming replication from the pg_stat_replication and pg_stat_wal_receiver views.

See the Replication Metrics section.

replication_slots #

Retrieves replication slot usage statistics from the pg_replication_slots view.

See the Replication Slot Metrics section.

sequences #

Collects sequence usage statistics from the pg_sequences view.

See the Sequence Metrics section.

settings_info #

Collects run-time parameter statistics from the pg_settings view.

See the Other Metrics section.

shardman_fast_path #

Collects Postgres Pro Shardman per-node statistics from the local shardman.pg_stat_fast_path view.

See the Postgres Pro Shardman Metrics section.

shardman_gv_monitor #

Collects Postgres Pro Shardman cluster-wide statistics from the global shardman.gv_stat_monitor view.

See the Postgres Pro Shardman Metrics section.

statements_generic #

Collects general statistics about statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_timing #

Collects statistics on statement execution time from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_parallel #

Collects parallel statistics from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_planning #

Collects statistics on statement planning time from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_shared_io #

Collects statistics on shared buffer usage by statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_local_io #

Collects statistics on local cache usage by statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_temp_io #

Collects statistics on temporary file usage by statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_wal #

Collects statistics on the amount of WAL written by statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_jit #

Collects statistics on Just-In-Time (JIT) compiler usage by statements from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

statements_queries #

Retrieves information about statement texts from the pg_stat_statements view.

See the SQL Query and Statement Metrics section.

subscription #

Collects subscription statistics from the pg_stat_subscription and pg_stat_subscription_stats views.

See the Subscription Metrics section.

tables #

Retrieves table-level access and tuple statistics from the pg_stat_all_tables view.

See the Table Usage Metrics section.

tables_io #

Retrieves table-level I/O statistics from the pg_statio_all_tables view.

See the Table Usage Metrics section.

tables_size #

Retrieves table, heap, toast size statistics from the pg_tables view.

See the Table Usage Metrics section.

tables_vacuum #

Retrieves table-level vacuum and analyze statistics from the pg_stat_all_tables view.

See the Table Usage Metrics section.

tablespaces #

Retrieves tablespace usage statistics.

See the Tablespace Usage Metrics section.

version #

Retrieves metrics with Postgres Pro version information.

See the Other Metrics section.

wait_sampling #

Retrieves metrics based on wait event samples (requires the pg_wait_sampling extension).

See the Wait Event Metrics section.

wal #

Retrieves statistics on the amount of WAL written by the instance from the pg_stat_wal view.

See the Tablespace Usage Metrics section.

Warning

Enabling extra plugins can lead to high overload on the DBMS instance and should be considered carefully.

The following plugins are disabled by default:

  • bloat_indexes and bloat_tables. Bloat estimation is a resource-intensive process, and, in the case of numerous tables, can create excessive load. It is recommended to limit data collection to specific databases, schemas, or even tables. Additionally, bloat data changes infrequently and may contain inaccuracies, so it is advisable to set a long interval between data collections — for example, 5 minutes or more.

  • indexes and tables. Tables and indexes contain a large amount of statistics. When there are many tables and indexes, a significant volume of metrics may be generated, potentially causing performance issues when writing to the metric storage. Additionally, not all of these metrics are valuable to the user. It is recommended to limit data collection by selecting only specific databases, schemas, or tables.

  • statements. Depending on the load on the DBMS instance, the volume of statistics on SQL statements can be huge. This may result in a significant number of metrics generated and increased write load on the metric storage. Due to the specific nature of statement statistics, they do not always provide sufficient user value. It is recommended to enable only those plugins that are truly useful for your specific use case.

  • statements_queries. Depending on the length of queries in the statement statistics, the metrics can incur significant overhead when writing to and storing in the metric storage. It is recommended to configure the collector to limit the maximum length of values in the metrics.

1.2.1.2. file_log #

Important

filelog has been renamed to file_log to comply with the component naming convention. The deprecated alias is still supported but produces warnings and will be completely removed in future releases. Update your configuration accordingly.

The file_log receiver is an open-source component of the OpenTelemetry Collector for gathering logs from the DBMS instance. The collector supports log collection in the CSV and JSON formats.

1.2.1.3. host_metrics #

Important

hostmetrics has been renamed to host_metrics to comply with the component naming convention. The deprecated alias is still supported but produces warnings and will be completely removed in future releases. Update your configuration accordingly.

The host_metrics receiver is an open-source component of the OpenTelemetry Collector for retrieving metrics from the operating system (may require root access).

1.2.1.4. journald #

The journald receiver is an open-source component of the OpenTelemetry Collector for gathering logs from the systemd journal, which is particularly useful for Postgres Pro Shardman and Postgres Pro Enterprise Manager (PPEM).

1.2.1.5. otlp #

The otlp receiver is an open-source component of the OpenTelemetry Collector for collecting data in the OTLP (OpenTelemetry Protocol) format. It is especially useful for working with Postgres ProGate.

1.2.1.6. sqlquery #

The sqlquery receiver is an open-source component of the OpenTelemetry Collector for gathering metrics and/or logs from custom SQL queries.

Warning

The sqlquery receiver is currently experimental and is not recommended for production use.

1.2.2. Processors #

1.2.2.1. attributes #

The attributes processor is an open-source component of the OpenTelemetry Collector for processing specific log record attributes.

1.2.2.2. resource #

The resource processor is an open-source component of the OpenTelemetry Collector for adding extra log record attributes.

1.2.2.3. batch #

The batch processor is an open-source component of the OpenTelemetry Collector for data batching and regulating the data transmission mechanism.

1.2.2.4. transform #

The transform processor is an open-source component of the OpenTelemetry Collector for modifying telemetry data using the OpenTelemetry Transformation Language (OTTL).

1.2.2.5. memory_limiter #

The memory_limiter processor is an open-source component of the OpenTelemetry Collector for preventing out-of-memory errors by limiting memory consumption.

1.2.2.6. filter #

The filter processor is an open-source component of the OpenTelemetry Collector that allows including or excluding telemetry data based on specified conditions.

1.2.2.7. metrics_transform #

Important

metricstransform has been renamed to metrics_transform to comply with the component naming convention. The deprecated alias is still supported but produces warnings and will be completely removed in future releases. Update your configuration accordingly.

The metrics_transform processor is an open-source component of the OpenTelemetry Collector that allows renaming metrics and managing (adding, renaming, deleting) labels, including scaling and aggregation operations.

1.2.3. Exporters #

1.2.3.1. prometheus #

The prometheus exporter is an open-source component of the OpenTelemetry Collector for exporting collected metrics over the HTTP server and publishing them on the /metrics page in the format of the Prometheus monitoring system. This exporter is the easiest to use — it does not require any external component configuration and can be enabled by default.

1.2.3.2. prometheus_remote_write #

The prometheus_remote_write exporter is an open-source component of the OpenTelemetry Collector for sending metrics via the remote write protocol to Prometheus-compatible systems, including Cortex, Mimir, Thanos, VictoriaMetrics.

1.2.3.3. otlp_http #

Important

otlphttp has been renamed to otlp_http to comply with the component naming convention. The deprecated alias is still supported but produces warnings and will be completely removed in future releases. Update your configuration accordingly.

The otlp_http exporter is an open-source component of the OpenTelemetry Collector for exporting collected metrics to an OTLP-compatible storage or monitoring system that has to be predeployed and accessible. otlp_http uses the HTTP protocol.

1.2.3.4. kafka #

The kafka exporter is an open-source component of the OpenTelemetry Collector for sending metrics and logs to Apache Kafka.

1.2.3.5. zabbix #

The zabbix exporter is a component of the collector for sending metrics to Zabbix. For usage examples, refer to Integration with Zabbix.

FAQ