New pg_database collector fails with 'permission denied for database rdsadmin' on AWS RDS
What did you do? Running postgres_exporter v0.11.0 with Amazon Aurora PostgreSQL data source with manually excluded databases, PG_EXPORTER_EXCLUDE_DATABASES="rdsadmin"
What did you expect to see? the new pg_database collector should evaluate the ENV "PG_EXPORTER_EXCLUDE_DATABASES" as the previous versions did
What did you see instead? Under which circumstances? no metrics at all, errors in the log (see below)
Environment Alpine Linux 3.16.2 in Docker (Kubernetes 1.22)
- System information:
Linux 5.4.196-108.356.amzn2.x86_64 x86_64
- postgres_exporter version:
postgres_exporter, version 0.11.1 (branch: HEAD, revision: b5fd2465646a09bb1c8dbd5c9c00b852da93927a)
build user: root@a2c981f603ff
build date: 20220818-20:58:17
go version: go1.18.5
platform: linux/amd64
- postgres_exporter flags:
none
-
PostgreSQL version:
Amazon Aurora PostgreSQL Engine version 11.15
-
Logs:
ts=2022-08-30T16:55:05.134Z caller=postgres_exporter.go:714 level=error err="queryNamespaceMappings returned 1 errors"
ts=2022-08-30T16:56:04.884Z caller=collector.go:196 level=error msg="collector failed" name=database duration_seconds=0.012370203 err="pq: permission denied for database rdsadmin"
I see the same error but with the v0.10.1 it works for me. Perhaps downgrading it may work for you as well.
Fixed in https://github.com/prometheus-community/postgres_exporter/pull/697
Included in release 0.12.0
it works, thanks. I will close the issue