From 6984a5fe685f534a174ac61c5c4d5e5e2fd174b3 Mon Sep 17 00:00:00 2001 From: Rishikesh Shah Date: Wed, 22 Apr 2026 00:16:21 +0530 Subject: [PATCH] DBAAS: Add Percona PostgreSQL + Patroni metrics to do-agent whitelist --- cmd/do-agent/whitelist.go | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/cmd/do-agent/whitelist.go b/cmd/do-agent/whitelist.go index b48a795..ae2c59f 100644 --- a/cmd/do-agent/whitelist.go +++ b/cmd/do-agent/whitelist.go @@ -157,6 +157,54 @@ var dbaasWhitelist = map[string]bool{ "mysql_perf_schema_file_events_seconds_total": true, "mysql_perf_schema_file_events_bytes_total": true, + // Advanced PostgreSQL / Percona (postgres_exporter + patroni_exporter native names; no relabeling) + // + // PostgreSQL Engine & Database Activity + "pg_up": true, + "pg_postmaster_start_time_seconds": true, + "pg_stat_database_numbackends": true, + "pg_stat_database_xact_commit": true, + "pg_stat_database_xact_rollback": true, + + // PostgreSQL Troubleshooting (tuple/index load, dead tuples, storage latency, WAL checkpoints) + "pg_stat_database_tup_returned": true, + "pg_stat_database_tup_fetched": true, + "pg_stat_user_tables_idx_scan": true, + "pg_stat_user_tables_seq_scan": true, + "pg_stat_user_tables_n_dead_tup": true, + "pg_stat_user_tables_last_autovacuum": true, + "pg_settings_autovacuum_freeze_max_age": true, + "pg_stat_database_temp_files": true, + "pg_stat_database_temp_bytes": true, + "pg_stat_bgwriter_checkpoints_timed": true, + "pg_stat_bgwriter_checkpoints_req": true, + "pg_wal_files_count": true, + "pg_stat_activity": true, + "pg_stat_database_blks_hit": true, + "pg_stat_database_blks_read": true, + + // Patroni (High Availability): cluster states, failovers, replication + "patroni_version": true, + "patroni_dcs_last_seen": true, + "patroni_primary": true, + "patroni_replica": true, + "patroni_standby_leader": true, + "patroni_is_paused": true, + "patroni_cluster_unlocked": true, + "patroni_failsafe_mode_is_active": true, + "patroni_postgres_server_version": true, + "patroni_postmaster_start_time": true, + "patroni_postgres_running": true, + "patroni_postgres_timeline": true, + "patroni_pending_restart": true, + "patroni_xlog_paused": true, + "patroni_postgres_in_archive_recovery": true, + "patroni_postgres_streaming": true, + "patroni_sync_standby": true, + "patroni_xlog_location": true, + "patroni_xlog_received_location": true, + "patroni_xlog_replayed_location": true, + "redis_total_connections_received": true, "redis_rejected_connections": true, "redis_evicted_keys": true,