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.
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.
biha retrieves
BiHA
cluster node statistics from the
biha.status_v
and
biha.nodes_v
views.
bloat_indexes retrieves information about index bloat.
bloat_tables retrieves information about table bloat.
buffercache monitors shared cache usage (requires the pg_buffercache extension).
cache collects cache usage statistics
from the
pg_stat_database
view.
checkpointer retrieves the cluster
checkpointer process activity from the
pg_stat_checkpointer
view.
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.
logs collects log statistics (for
example, log directory size) using the
pg_ls_logdir()
function.
pgpro_statements_generic collects
general statistics from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_inval_msgs gathers
the number of cache invalidation messages from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
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).
pgpro_statements_local_io collects
statistics on local cache usage by statements from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_parallel collects
parallel statistics from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_planning collects
statistics on statement planning time from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_plans gathers plan
texts from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_queries retrieves
information about statement texts from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_rusage gathers
resource usage statistics of the statement planning and execution
from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_shared_io collects
statistics on shared buffer usage by statements from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_temp_io collects
statistics on temporary file usage by statements from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
pgpro_statements_timing collects
statistics on statement execution time from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
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).
pgpro_statements_wal collects
statistics on the amount of WAL written by statements from the
pgpro_stats_statements
view (requires the pgpro_stats
extension).
prepared_transactions retrieves
statistics on prepared transactions from the
pg_prepared_xacts
view.
recovery collects recovery statistics
from the
pg_stat_recovery_prefetch
and
pg_stat_database_conflicts
views.
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.
sequences collects sequence usage
statistics from the pg_sequences
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_parallel collects
parallel statistics 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.
subscription collects subscription
statistics from the
pg_stat_subscription
and
pg_stat_subscription_stats
views.
tables retrieves table-level access and tuple statistics from the pg_stat_all_tables view.
tables_io retrieves table-level I/O statistics from the pg_statio_all_tables view.
tables_size retrieves table, heap, toast size statistics from the pg_tables view.
tables_vacuum retrieves table-level vacuum and analyze statistics from the pg_stat_all_tables view.
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 from the pg_stat_wal view.
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.
filelog #
The
filelog 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.
hostmetrics #
The
hostmetrics receiver is an open-source
component of the OpenTelemetry Collector for retrieving
metrics from the operating system (may require root access).
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
Shardman
and
Postgres Pro Enterprise Manager (PPEM).