NAME

pgbouncer_ is a plugin to get the pool and stat values for a single pgbouncer pool name

APPLICATION

perl and DBD::Pg is required, and pgbouncer must been installed with a correct setup access for a stat account

CONFIGURATION

the plugin that will be run needs to have the pool name after the plugin base name. alternatively, pool name can be specified in config file as env.pgbouncer_pool option, separating plugin name from pool name.

plugin configuration

eg: pgbouncer_foo will run for the pool named foo.

see SHOW POOLS database list for the pool name

munin plugin config file

in the plugin config file under the [pgbouncer] name the access information ca be set.

eg: [pgbouncer*] env.pgbouncer_pass barfoo

more extended would be: [pgbouncer*] env.pgbouncer_pass barfoo env.pgbouncer_user bar env.pgbouncer_port 6542 env.pgbouncer_host localhost

another example, where different pgbouncers (and so munin plugins) connecting to same db: [pgbouncer_weblogin] env.pgbouncer_pass barfoo env.pgbouncer_user bar env.pgbouncer_port 6542 env.pgbouncer_host localhost env.pgbouncer_pool dbname

   [pgbouncer_webmain]
     env.pgbouncer_pass barfoo
     env.pgbouncer_user bar
     env.pgbouncer_port 6543
     env.pgbouncer_host localhost
     env.pgbouncer_pool dbname

The database name is always pgbouncer

OUTPUT

The plugin will output 5 graphs in the group pgbouncer

Average bytes received/sent

This graph will show the average bytes sent and received by the pgbouncer for this pool

Average connections

This graph will show the average amount of connections to the pgbouncer for this pool

Average query time

This graph shows the average query time as processed by the pgbouncer for this pool in microseconds. The data will be shorted by standard SI. eg, m = milli, k = kilo.

So 4.61K is 4610 milliseconds

Client connections

This graph shows the active and waiting client connections to pgbouncer for this pool

Server connections

This graph shows the server connections to pgbouncer for this pool. The following data sets are shown: active, idle, used, tested, login

Max wait

how long the oldest client the queue has waited, should be always 0

ACKNOWLEDGEMENTS

Original idea derived from a simple python script by Dimitri Fontaine

SEE ALSO

See further info on stats and pools on the pgbouncer homepage: http://pgbouncer.projects.postgresql.org/doc/usage.html#_show_commands

VERSION

1.0

AUTHOR

Clemens Schwaighofer <gullevek@gullevek.org>

LICENSE

GPLv2