PostgreSQL
Plugin: go.d.plugin Module: postgres
Overview
This collector monitors the activity and performance of Postgres servers, collects replication statistics, metrics for each database, table and index, and more.
It establishes a connection to the Postgres instance via a TCP or UNIX socket. To collect metrics for database tables and indexes, it establishes an additional connection for each discovered database.
This collector is supported on all platforms.
This collector supports collecting metrics from multiple instances of this integration, including remote instances.
Default Behavior
Auto-Detection
By default, it detects instances running on localhost by trying to connect as root and netdata using known PostgreSQL TCP and UNIX sockets:
- 127.0.0.1:5432
- /var/run/postgresql/
Limits
Table and index metrics are not collected for databases with more than 50 tables or 250 indexes. These limits can be changed in the configuration file.
Performance Impact
The default configuration for this integration is not expected to impose a significant performance impact on the system.
Metrics
Metrics grouped by scope.
The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
Per PostgreSQL instance
These metrics refer to the entire monitored application.
This scope has no labels.
Metrics:
Metric | Dimensions | Unit |
---|---|---|
postgres.connections_utilization | used | percentage |
postgres.connections_usage | available, used | connections |
postgres.connections_state_count | active, idle, idle_in_transaction, idle_in_transaction_aborted, disabled | connections |
postgres.transactions_duration | a dimension per bucket | transactions/s |
postgres.queries_duration | a dimension per bucket | queries/s |
postgres.locks_utilization | used | percentage |
postgres.checkpoints_rate | scheduled, requested | checkpoints/s |
postgres.checkpoints_time | write, sync | milliseconds |
postgres.bgwriter_halts_rate | maxwritten | events/s |
postgres.buffers_io_rate | checkpoint, backend, bgwriter | B/s |
postgres.buffers_backend_fsync_rate | fsync | calls/s |
postgres.buffers_allocated_rate | allocated | B/s |
postgres.wal_io_rate | write | B/s |
postgres.wal_files_count | written, recycled | files |
postgres.wal_archiving_files_count | ready, done | files/s |
postgres.autovacuum_workers_count | analyze, vacuum_analyze, vacuum, vacuum_freeze, brin_summarize | workers |
postgres.txid_exhaustion_towards_autovacuum_perc | emergency_autovacuum | percentage |
postgres.txid_exhaustion_perc | txid_exhaustion | percentage |
postgres.txid_exhaustion_oldest_txid_num | xid | xid |
postgres.catalog_relations_count | ordinary_table, index, sequence, toast_table, view, materialized_view, composite_type, foreign_table, partitioned_table, partitioned_index | relations |
postgres.catalog_relations_size | ordinary_table, index, sequence, toast_table, view, materialized_view, composite_type, foreign_table, partitioned_table, partitioned_index | B |
postgres.uptime | uptime | seconds |
postgres.databases_count | databases | databases |