commit | ce5fbab03c85774368cddb72ddcee83626c6a49d | [log] [tgz] |
---|---|---|
author | Jarek Potiuk <jarek@potiuk.com> | Wed Sep 22 12:54:34 2021 +0200 |
committer | Jarek Potiuk <jarek@potiuk.com> | Wed Sep 22 12:54:34 2021 +0200 |
tree | a2819262e18d6c8fd825c336513fa8c366bcb46d | |
parent | 66e237846dd04abe88766b1229c8a4f5859fc423 [diff] |
Update PGBouncer exporter version
Prometheus exporter for Pgbouncer metrics.
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
In order to build the binary for the development docker compose setup you can use this command:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
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 |
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.