-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pb metric collection #1
Comments
I am also having the same problem. After running the exporter like so:
I then try and access the metrics and get the following:
Any help on the matter would be greatly appreciated. Thanks! |
I use this now : http://git.cbaines.net/prometheus-pgbouncer-exporter/ |
I'm also running into this issue when I try to hit the |
The cause here is that the code incorrectly assumes that there will only ever be a single user for a given db. So, for example, if you have a sentry web-write and web-read user for the same DB, the pool metrics fails because the code breaks cardinality via not exposing user. Same issue exists for pool_mode, although that's a fairly esoteric config. |
If you're using auth_query mode + autodb for pgbouncer, you wind up having multiple users for a single DB. That output looks roughly like thus: ``` database | user | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | maxwait_us | pool_mode -----------+-----------+-----------+------------+-----------+---------+---------+-----------+----------+---------+------------+----------- paste | paste | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | session paste | pgbouncer | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | session ``` With how the code was written, this would break cardinality. User *must* be a label in this case. As for pool_mode, it doesn't have to be a label- it's just useful for exporting it. This fixes ticket #1.
If you're using auth_query mode + autodb for pgbouncer, you wind up having multiple users for a single DB. That output looks roughly like thus: ``` database | user | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | maxwait_us | pool_mode -----------+-----------+-----------+------------+-----------+---------+---------+-----------+----------+---------+------------+----------- paste | paste | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | session paste | pgbouncer | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | session ``` With how the code was written, this would break cardinality. User *must* be a label in this case. As for pool_mode, it doesn't have to be a label- it's just useful for exporting it. This fixes ticket #1 and larseen#7 (same issue)
Improve label support
Hi, thanks for this exporter
after compile, i launch this :
./pgbouncer_exporter -pgBouncer.connectionString "postgres://prometheus:XXXXXX@localhost:6432/pgbouncer?sslmode=disable"
INFO[0000] Starting scrape source="collector.go:285"
INFO[0000] Starting pgbouncer exporter version: (version=, branch=, revision=) source="pgbouncer_exporter.go:49"
INFO[0006] Starting scrape source="collector.go:285"
But, on the metric page, i have this :
An error has occurred during metrics collection:
80 error(s) occurred:
could you help me please?
The text was updated successfully, but these errors were encountered: