Database Reference
In-Depth Information
Providing PostgreSQL information to monitoring tools
The historical monitoring information is best to use when all of it is available from the same
place and at the same timescale. Most monitoring systems have a plugin architecture, so
adding new kinds of data inputs to them means installing a plugin. Sometimes, you may need
to write or develop this plugin, but writing a plugin for something, such as Cacti is easy; you
just have to write a script that outputs monitored values in simple text format.
Some useful things to get into graphs are number of connections, disk usage, number of
queries, number of WAL files, most numbers from pg_stat_user_tables and pg_stat_
user_indexes , and so on.
The preceding Cacti screenshot includes data for CPU, disk and network usage, pgbouncer
connection pooler, and number of postgresql client connections. As you can see, they are
nicely correlated.
One Swiss Army knife script, which can be used from both Cacti and Nagios, is check_
postgres , available at http://bucardo.org/check_postgres/check_postgres.
pl.html . It has ready-made reporting actions for a large array of things worth monitoring in
PostgreSQL. Another similar effort for Nagios is available at the following URL:
http://pgfoundry.org/projects/nagiosplugins/
For Munin, there are some PostgreSQL plugins available at the Munin plugin repository at the
following URL:
http://exchange.munin-monitoring.org/plugins/search?keyword=postgres
 
Search WWH ::




Custom Search