jbub / pgbouncer_exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus exporter for Pgbouncer metrics.
License: MIT License
Prometheus exporter for Pgbouncer metrics.
License: MIT License
PgBouncer 1.16.0 has been released on Aug 9, 2021. This release contains some new features and pgbouncer_exporter doesn't work with it.
I'm getting an error message and no any metrics:
"could not get store result: could not get pools: unexpected column: cl_cancel_req"
When I use PgBouncer 1.15.0 version then everything is OK. Did you plan to release pgbouncer_exporter version compatible with PgBouncer 1.16.0?
We have https://github.com/prometheus-community/pgbouncer_exporter. An interest in merging any missing functionality there?
ERRO[0003] unable to get store result: unable to get stats: pq: strconv.ParseInt: parsing "17588200675878996039": value out of range source="exporter.go:391"
db get data parsing error
currently pgbouncer exporter service run as root, this raises security issues and fails audit process.
below PR allows to run as non root
#18
Hi,
Thank you for creating such a useful tool!
The issue I have faced is that my pgbouncer
is running together with pgbouncer_exporter
in the same kubernetes pod so whenever metrics exporter encounters an error it restarts entire pod. I am not seeing any error logs reported by pgbouncer_exporter
but it's been killed. I am not familiar with go
language at all, just wondering are there any try/catch statements so if something unexpected happens you catch and log something to stdout and rethrow an exception again?
Also are you planning on maintaining this repository? I have noticed decreased number of commits / unresolved prs & issues etc.
Versions:
pgbouncer - bitnami/pgbouncer:1.18.0
pgbouncer_exporter - PGBOUNCER_EXPORTER_VERSION="0.14.0"
go version - GO_VERSION="1.19.3"
Again thank you for your time!
The 0.9.0 image hosted on docker hub is currently arm64 only.
I expect that linux/amd64 would continue to be available.
Hello, how to use the exporter with many pgbouncer instances, so on a graphana to see more than one line on same graph? Something like a label per host.
Information is gathered through service URL and there is no info about the host, but if exporter is placed in a pod along with the pgbouncer, hostname can be acquired.
We've seen some new errors in the logs when using pgbouncer versions >= 1.18.0:
2023/05/16 11:37:40 could not get store result: could not get pools: unexpected column: cl_active_cancel_req
2023/05/16 11:37:50 could not get store result: could not get pools: unexpected column: cl_active_cancel_req
2023/05/16 11:38:00 could not get store result: could not get pools: unexpected column: cl_active_cancel_req
2023/05/16 11:38:10 could not get store result: could not get pools: unexpected column: cl_active_cancel_req
2023/05/16 11:38:20 could not get store result: could not get pools: unexpected column: cl_active_cancel_req
While experimenting with getting pgbouncer itself with the correct pool mode. I noticed that if you switch a user between pool modes, the exporter does not reset the gauge for a pool mode that goes away for a user back to 0
.
ie I switched a user from transaction
to session
for their pool mode so their session
pool mode shows up:
pgbouncer_exporter_pools_active_clients{database="my_db",pool_mode="session",user="my_user} 10
but their transaction
pool_mode continues to as well:
pgbouncer_exporter_pools_active_clients{database="my_db",pool_mode="transaction",user="my_user"} 10
As a note, restarting the exporter does fix this.
These fields were replaced in PgBouncer 1.8:
Line 1 in d0f3d6f
The base image in this Dockerfile is 3 years old, and is based on a version of Alpine that reached end-of-support over a year ago.
$ date
Mon Dec 14 16:48:48 PST 2020
$ docker run --rm -ti iron/go sh
Unable to find image 'iron/go:latest' locally
latest: Pulling from iron/go
1eae7a7426b0: Pull complete
5dd3d2345e00: Pull complete
Digest: sha256:7006ab5716c392b003f1da7a07a49171989c5c78cbf764a0371832b49767023b
Status: Downloaded newer image for iron/go:latest
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.7.0
PRETTY_NAME="Alpine Linux v3.7"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
/ #
It's old enough that security scanners are just saying ๐คทโโ๏ธ or "The vulnerability detection may be insufficient because security updates are not provided".
Tryign to use this exporter I get this error:
unable to initialize store: pq: Could not detect default username. Please provide one explicitly
I guess the exporter expects access with an specific username?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.