-
Notifications
You must be signed in to change notification settings - Fork 0
License
petanne/prometheus-pgbouncer-exporter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Support pgbouncer 1.7.X and 1.8.X Extended from http://git.cbaines.net/prometheus-pgbouncer-exporter/ Add re-connect once when pgbouncer connection is closed. Add parameter pgbouncer-password for support pgbouncer password. Add version check and support PgBouncer 1.8. Add ssl_support from @serhermar pr. # requirements ConfigArgParse prometheus_client psycopg2 # Usage: python3 setup.py install /usr/bin/prometheus-pgbouncer-exporter --pgbouncer-host=127.0.0.1 --pgbouncer-port=6432 --pgbouncer-user=stats --pgbouncer-password=your_password ======================================================================================= # PgBouncer exporter for Prometheus This is a simple exporter for PgBouncer that makes several metrics available to Prometheus. Metrics are exported from the SHOW LISTS, STATS, POOLS and DATABASES command output. For the full list, see the prometheus\_pgbouncer\_exporter/collectors.py file. Please send any comments or queries to Christopher Baines <[email protected]>. ## Installation ### Debian You can build a Debian binary package from the source package in the git repository. Alternatively, you can download a binary package from here: <http://cbaines.net/projects/prometheus-pgbouncer-exporter/releases/> ### Other Operating Systems I would recommend installing using setuptools, then running the promtheus-pgbouncer-exporter script. A systemd service file is provided which can be used if you have systemd. ## Authentication The service connects to the pgbouncer admin console to gather metrics. The service file runs the service as the postgres user (which is assumed to be the user which pgbouncer is running as), such that it can access the admin console (for which access is allowed if the login comes from via a Unix socket and the client has the same user id as the pgbouncer service). This setup does mean that the exporter service (when running as the postgres user) has far more capabilities than it requires. A more secure approach is to run the service as a unprivileged user, which is listed in the stats_users configuration parameter, as this means the process does not have to run as the postgres user, and will be restricted to using the SHOW command.
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published