Skip to content

Prometheus exporter for Pgbouncer metrics.

License

Notifications You must be signed in to change notification settings

jbub/pgbouncer_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3666e04 · Mar 11, 2025
Oct 10, 2024
Mar 11, 2025
Jun 21, 2021
Mar 11, 2025
Mar 11, 2025
Jun 17, 2021
Mar 11, 2025
Mar 11, 2025
Mar 11, 2025
Mar 11, 2025
Jun 17, 2021
Mar 11, 2025
Mar 11, 2025
Oct 10, 2024
Oct 10, 2024
Oct 22, 2020

Repository files navigation

Pgbouncer exporter

Build Status Docker Pulls Go Report Card

Prometheus exporter for Pgbouncer metrics. The minimum supported version of Pgbouncer is 1.18.

Docker

Metrics are by default exposed on http server running on port 9127 under the /metrics path.

docker run \ 
  --detach \ 
  --env "DATABASE_URL=postgres://user:password@pgbouncer:6432/pgbouncer?sslmode=disable" \
  --publish "9127:9127" \
  --name "pgbouncer_exporter" \
  jbub/pgbouncer_exporter

Collectors

All of the collectors are enabled by default, you can control that using environment variables by settings it to true or false.

Name Description Env var Default
stats Per database requests stats. EXPORT_STATS Enabled
pools Per (database, user) connection stats. EXPORT_POOLS Enabled
databases List of configured databases. EXPORT_DATABASES Enabled
lists List of internal pgbouncer information. EXPORT_LISTS Enabled

Default constant prometheus labels

In order to provide default prometheus constant labels you can use the DEFAULT_LABELS enviroment variable. Labels can be set in this format instance=pg1 env=dev. Provided labels will be added to all the metrics.