[receiver/postgresql]: Add connect_database config option - #50921
[receiver/postgresql]: Add connect_database config option#50921spathlavath wants to merge 3 commits into
Conversation
Lets the receiver connect to a database other than "postgres" for cluster-wide queries (pg_stat_statements, discovery, etc.), independent of the databases reporting scope.
Pull request dashboard statusWaiting on the author · refreshed 2026-09-11 12:30 UTC Wait for the required status checks to report; this pull request moves to reviewers once the results are clean. Status above doesn't look right?
|
|
/dashboard route:reviewers |
|
@spathlavath I might be missing something. Can you help understand what value does this add when there is support for auto-discovery already. |
@akgrover Auto-discovery and this option solve different problems. Auto-discovery ( The problem is Since the stats are cluster-wide and the view carries a Please go through #50920 for more details. |
Description
connect_databaseconfig option to receiver/postgresqlreceiverpostgres, so existing configs are unaffecteddatabases(the reporting scope) - pg_stat_statements is tracked cluster-wide, so the connection target doesn't need to match what's being monitoredpostgres, or when connecting through a dedicated monitoring-only databaseLink to tracking issue
Fixes #50920
Testing
postgres, using a configured value, and connect_database outsidedatabasesproducing no validation errorpg_stat_statementsinstalled only in a non-default database - confirmed the existing default behavior still fails the same way, and the new option fixes itDocumentation
Authorship