pgbouncer_exporter
pgbouncer_exporter copied to clipboard
How does this work?
How do I set up this exporter? What is the connection string supposed to be? I tried the example, but all I get is level=error ts=2021-10-14T10:29:24.248Z caller=collector.go:129 msg="error setting up DB connection" err="error pinging pgbouncer: \"pq: not allowed\""
.
@zilti Have you found the way to get it working..?
Use latest version and it works. Just set up pgbouncer.ini with
admin_users = pgbouncer
This enable the user pgbouncer to connect to pgbouncer database and execute queries.
And now execute pgbouncer_exporter on same server
./pgbouncer_exporter --pgBouncer.connectionString="postgres://pgbouncer:***@localhost:6432/pgbouncer?sslmode=disable" --pgBouncer.pid-file="/var/run/pgbouncer/pgbouncer.pid" --web.listen-address=":9128"
ts=2022-11-21T23:58:34.853Z caller=collector.go:406 level=info msg="Starting scrape"
ts=2022-11-21T23:58:34.855Z caller=pgbouncer_exporter.go:78 level=info msg="Starting pgbouncer_exporter" version="(version=0.5.1, branch=master, revision=a60dff64e88ba0f94743749b97528cc8cc906364)"
ts=2022-11-21T23:58:34.855Z caller=pgbouncer_exporter.go:79 level=info msg="Build context" build_context="(go=go1.18.8, user=***, date=20221121-23:51:54)"
ts=2022-11-21T23:58:34.855Z caller=pgbouncer_exporter.go:96 level=info msg="Listening on" address=:9128
ts=2022-11-21T23:58:43.651Z caller=collector.go:406 level=info msg="Starting scrape"
Use latest version and it works. Just set up pgbouncer.ini with
admin_users = pgbouncer
It seems that the slightly more secure stats_users = pgbouncer
also works.
Hi Team,
Can someone help me here ? Getting the same error even after using latest version and I am trying to connect with the admin users only.
pgbouncer_exporter, version 0.8.0 (branch: HEAD, revision: af944f62e7259340c7401bd07ca7dcf89cf23c1c) build user: root@35e99bbef5e7 build date: 20240403-11:36:49 go version: go1.22.1 platform: linux/amd64 tags: unknown
When I try below command still getting the error.
Command - /opt/pgbouncer_exporter/pgbouncer_exporter --pgBouncer.connectionString="postgres://postgres:xyzzz@localhost:6433/pgbouncer?sslmode=disable"
Error - ts=2024-08-12T09:00:25.963Z caller=collector.go:142 level=error msg="error setting up DB connection" err="error pinging pgbouncer: pq: not allowed"