When using multiple DSN, pg_database_size_bytes only return metrics from first DSN
What did you do? Install postgres_exporter with multiple postgresql DSN
What did you expect to see?
show metric pg_database_size_bytes from all database from all DSN and with server label
What did you see instead? Under which circumstances?
Only pg_database_size_bytes from the first DSN in the comma-separated DSN is returned and without server label
Environment
-
System information: Kubernetes 1.28 on AWS EKS
-
postgres_exporter version:
prometheus-postgres-exporter-5.1.0 v0.14.0 -
postgres_exporter flags:
-
PostgreSQL version:
all supported version
-
Logs:
I tried switching the DSN around and the problem persist, postgres_expoter only return pg_database_size_bytes from the first DSN
I am facing same issue. I also don't see the details on which server the database is running. My second server has an idential database, but bigger in size and I noticed that by moving that server at the start, that size of the database "jumped". Using docker where postgres-exporter is running in with an envronment settings like:
DATA_SOURCE_NAME=postgresql://user:pw@server1:5432/postgres,postgresql://user:pw@server2:5432/postgres,postgresql://user:pw@server3:5432/postgres