Closed LexVar closed 10 months ago
Try:
pgbouncer_exporter --pgBouncer.connectionString='postgres:///pgbouncer?host=/var/run/postgresql/&port=6432&sslmode=disable'
Thank you, that worked like a charm. I just had to add the user:
--pgBouncer.connectionString='postgres:///pgbouncer?host=/var/run/postgresql/&port=6432&user=pgbouncer&sslmode=disable'
I will mark the issue as done
I ran into an issue setting up the exporter in the same VM where pgbouncer is running. I have a pgbouncer_exporter user setup with a password to connect to the pgbouncer DB locally through pgbouncer's unix socket.
I can connect to the pgbouncer DB with all these 3 commands:
But none of the 3 connection strings work in the pgbouncer_exporter:
I can see by default if the host is not specified, pgbouncer_exporter will use localhost ::1 instead of using the unix socket. PGbouncer logs from the login failure:
So then I have to specify the unix socket directory. How can I do this with the exporter?