Categorygithub.com/prometheus-community/pgbouncer_exporter

# README

PgBouncer exporter

Build Status

Prometheus exporter for PgBouncer. Exports metrics at 9127/metrics

Building and running

make build
./pgbouncer_exporter <flags>

To see all available configuration flags:

./pgbouncer_exporter -h

PGBouncer configuration

The pgbouncer_exporter requires a configuration change to pgbouncer to ignore a PostgreSQL driver connection parameter. In the pgbouncer.ini please include this option:

ignore_startup_parameters = extra_float_digits

Run with docker

docker run prometheuscommunity/pgbouncer-exporter <flags>

Metrics

PgBouncer columnPrometheus MetricDescription
stats_total_query_countpgbouncer_stats_queries_pooled_totalTotal number of SQL queries pooled
stats.total_query_timepgbouncer_stats_queries_duration_seconds_totalTotal number of seconds spent by pgbouncer when actively connected to PostgreSQL, executing queries
stats.total_receivedpgbouncer_stats_received_bytes_totalTotal volume in bytes of network traffic received by pgbouncer, shown as bytes
stats.total_requestspgbouncer_stats_queries_totalTotal number of SQL requests pooled by pgbouncer, shown as requests
stats.total_sentpgbouncer_stats_sent_bytes_totalTotal volume in bytes of network traffic sent by pgbouncer, shown as bytes
stats.total_wait_timepgbouncer_stats_client_wait_seconds_totalTime spent by clients waiting for a server in seconds
stats.total_xact_countpgbouncer_stats_sql_transactions_pooled_totalTotal number of SQL transactions pooled
stats.total_xact_timepgbouncer_stats_server_in_transaction_seconds_totalTotal number of seconds spent by pgbouncer when connected to PostgreSQL in a transaction, either idle in transaction or executing queries
pools.cl_activepgbouncer_pools_client_active_connectionsClient connections linked to server connection and able to process queries, shown as connection
pools.cl_waitingpgbouncer_pools_client_waiting_connectionsClient connections waiting on a server connection, shown as connection
pools.sv_activepgbouncer_pools_server_active_connectionsServer connections linked to a client connection, shown as connection
pools.sv_idlepgbouncer_pools_server_idle_connectionsServer connections idle and ready for a client query, shown as connection
pools.sv_usedpgbouncer_pools_server_used_connectionsServer connections idle more than server_check_delay, needing server_check_query, shown as connection
pools.sv_testedpgbouncer_pools_server_testing_connectionsServer connections currently running either server_reset_query or server_check_query, shown as connection
pools.sv_loginpgbouncer_pools_server_login_connectionsServer connections currently in the process of logging in, shown as connection
pools.maxwaitpgbouncer_pools_client_maxwait_secondsAge of oldest unserved client connection, shown as second
config.max_client_connpgbouncer_config_max_client_connectionsConfigured maximum number of client connections
config.max_user_connectionspgbouncer_config_max_user_connectionsConfigured maximum number of server connections per user

TLS and basic authentication

The pgbouncer exporter supports TLS and basic authentication.

To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository.

# Functions

No description provided by the author

# Constants

Use this column as a counter.
Ignore this column.
This column should be interpreted as a text duration (and converted to milliseconds).
Use this column as a gauge.
Use this column as a label.
Use this column with the supplied mapping of text values.

# Structs

No description provided by the author
Exporter collects PgBouncer stats from the given server and exports them using the prometheus metrics package.
Stores the prometheus metric description which a given column will be mapped to by the collector.
Groups metric maps under a shared set of labels.