I just released version 2.0.1 of the
check_postgres.pl program. While in the past this script was strictly for use as a
Nagios plugin, it now features two additional output modes. While Nagios is still the default, you can now ask for
MRTG and "simple" output by using the --output= option. The MRTG option outputs four lines of information, with the first always being a simple number. The "simple" output mode simply outputs the first line of the MRTG output - in other words, a single number, nothing more and nothing less. This is very useful for times when you just want to check the state of something without worrying about setting warning limits, querying exit codes, etc. See the
the documentation for complete details.
This version also greatly speeds up the "check_bloat" action, which gives a rough estimate of how bloated the tables and indexes in your database are. Rather than use a large regex to parse the output, it now simply does a split. Kudos goes to the new version of
the Devel::NYTProf module, which pointed out that particular bottleneck quite easily (and colorfully!).
New ideas and patches always welcome, just mail
the list or play around with the
git repository.