pgbouncer_exporter
pgbouncer_exporter copied to clipboard
SHOW POOLS fails to scrape if multiple databases with different users are present
I have multiple database with different users:
pgbouncer=# show pools;
database | user | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | pool_mode
-----------------------------+----------------+-----------+------------+-----------+---------+---------+-----------+----------+---------+-------------
gitlabhq_production | chatops | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
gitlabhq_production | gitlab | 363 | 0 | 1 | 4 | 0 | 0 | 0 | 0 | transaction
gitlabhq_production | gitlab_geo_fdw | 20 | 0 | 2 | 6 | 9 | 0 | 0 | 0 | transaction
gitlabhq_production | pgbouncer | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | transaction
gitlabhq_production_sidekiq | gitlab | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
gitlabhq_production_sidekiq | pgbouncer | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
gitlabhq_production_sidekiq | C | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
pgbouncer | pgbouncer | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | statement
(8 rows)
This results in:
INFO[0036] Starting scrape source="collector.go:282"
An error has occurred during metrics collection:
40 error(s) occurred:
* collected metric pgbouncer_pools_client_active_connections label:<name:"database" value:"gitlabhq_production" > gauge:<value:434 > was collected before with the same name and label values
Dupe of #1