7.1. Receivers #

7.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 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.

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.

The postgrespro receiver includes the following plugins:

  • activity: Retrieves general activity in the instance from the pg_stat_activity view.

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

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

  • bloat_indexes: Retrieves information about index bloat.

  • bloat_tables: Retrieves information about table bloat.

  • buffercache: Monitors shared cache usage (requires the pg_buffercache extension).

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

  • databases: Retrieves database usage statistics from the pg_stat_database view.

  • functions: Retrieves user function usage statistics from the pg_stat_user_functions view.

  • indexes: Retrieves index usage statistics from the pg_stat_user_indexes and pg_statio_user_indexes views.

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

  • locks: Retrieves lock and wait state information from the pg_locks view.

  • prepared_transactions: Retrieves statistics on prepared transactions from the pg_prepared_xacts view.

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

  • replication_slots: Retrieves replication slot usage statistics from the pg_replication_slots view.

  • statements_generic: Collects general statistics about statements from the pg_stat_statements view.

  • statements_timing: Collects statistics on statement execution time from the pg_stat_statements view.

  • statements_planning: Collects statistics on statement planning time from the pg_stat_statements view.

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

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

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

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

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

  • statements_queries: Retrieves information about statement texts from the pg_stat_statements view.

  • tables: Retrieves table usage statistics from the pg_stat_user_tables and pg_statio_user_tables views.

  • tablespaces: Retrieves tablespace usage statistics.

  • version: Retrieves metrics with Postgres Pro version information.

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

  • wal: Retrieves statistics on the amount of WAL written by the instance.

Warning

⚠️ IMPORTANT! 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 metrics 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 metrics storage. It is recommended to configure the collector to limit the maximum length of values in the metrics.

7.1.2. filelog #

The filelog receiver is an open component of OpenTelemetry for collecting logs from the DBMS instance. The collector supports log collection in the CSV and JSON formats.

7.1.3. hostmetrics #

The hostmetrics receiver is an open component of OpenTelemetry for collecting metrics from the operating system (may require root access).