Data Sources
Connected Sources
The module collects data from PostgreSQL system views, the Patroni REST API, the PgBouncer administration console, and PostgreSQL logs.
| Source | Data | Mechanism |
|---|---|---|
| PostgreSQL system views | metrics, activity, locks, queries, objects, settings, and replication | JDBC polling through Smart Monitor Data Collector |
| Patroni | node roles and states | REST API |
| PgBouncer | clients, queues, and pools | administration console over JDBC |
jsonlog, auto_explain | errors, deadlocks, waits, temporary files, and plans | collection by the Smart Beat agent |
pgaudit | object access, DDL, roles, and permissions | collection by the Smart Beat agent |
Collection Configurations
The PostgreSQL data collection package contains 13 configurations:
| Configuration | Purpose | Target Index |
|---|---|---|
pg_capabilities | version, permissions, extensions, and settings | db_meta |
pg_stats | database and connection statistics | db_metrics |
pg_bgwriter_io | background writes, checkpoints, and I/O | db_metrics |
pg_objects | sizes, tables, indexes, and bloat | db_metrics |
pg_settings | database settings | db_metrics, db_meta |
pg_activity | sessions and transactions | db_activity |
pg_locks | locks and waits | db_activity |
pg_waits | wait profile | db_activity |
pg_statements | cumulative query statistics | db_statements |
pg_replication | replication, slots, and WAL archiving | db_replication |
pg_patroni | Patroni state | db_replication |
pg_pgbouncer | PgBouncer state | db_replication |
pg_logs | PostgreSQL logs, auto_explain, and pgaudit | db_logs, db_audit |
The first 12 configurations run from an external node without an agent on the database server. pg_logs requires Smart Beat on every PostgreSQL node.
Indexes
| Index | Purpose |
|---|---|
db_metrics | connections, TPS, cache, I/O, sizes, XID, tables, and autovacuum |
db_activity | sessions, transactions, locks, and wait profile |
db_statements | pg_stat_statements statistics |
db_logs | log events and auto_explain plans |
db_replication | replication, slots, Patroni, and PgBouncer |
db_audit | pgaudit events |
db_meta | source capabilities and collection state |
db_instance_asset | snapshot of clusters, instances, and extensions for Inventory |
db_query_top | hourly snapshots of the most expensive queries |