SCRAM-SHA-256 is not supported by postgres exporter, getting authentication failed error
What did you do?
What did you expect to see? Postgres exporter must be able to connect to postgres database if SCRAM-SHA-256 is enabled .
What did you see instead? Under which circumstances? Getting this error:- Aug 28 08:56:13 HOSTNAME postgres_exporter[2177291]: ts=2023-08-28T08:56:13.556Z caller=server.go:74 level=info msg="Established new database connection" fingerprint=localhost:5432 Aug 28 08:56:14 XXXXXXXX.com postgres_exporter[2177291]: ts=2023-08-28T08:56:14.562Z caller=postgres_exporter.go:691 level=error err="Error opening connection to database (postgresql://postgres_exporter:PASSWORD_REMOVED@localhost:5432/postgres?sslmode=disable): pq: password authentication failed for user "postgres_exporter""
Postgres exporter is unable to connect to postgres database . Both postgres exporter and Postgres database are running on same server.
Environment
-
System information:
insert output of
uname -srmhere
Linux 4.18.0-425.19.2.el8_7.x86_64 x86_64
-
postgres_exporter version:
insert output of
postgres_exporter --versionhere postgres_exporter, version 0.13.1 -
postgres_exporter flags:
insert list of flags used here
-
PostgreSQL version:
insert PostgreSQL version here PostgreSQL 14.7 (EnterpriseDB Advanced Server 14.7.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-16), 64-bit
-
Logs:
insert logs relevant to the issue here
Are you able to post a minimal example of running postgres in this way so that we can investigate and test a fix? A docker example is easiest for me. I want to be sure I understand the problem and how to fix it since we rely on an upstream postgres driver.
Hi,
We are using enterprise postgres and below is the line added in pg_hba.conf
host all all 0.0.0.0/0 scram-sha-256
Both postgres cluster instance and postgres exporter are running on same DB server...
Hoping that above information is helpful else please help me to understand what are you looking for .
hi , Any update? Please consider this issue on priority since due to this issue we are unable to monitor PG14 targets ....