--- #YAML:1.0
name : check_postgres.pl
-version : 2.14.1
+version : 2.14.2
abstract : Postgres monitoring script
author:
provides:
check_postgres:
file : check_postgres.pl
- version : 2.14.1
+ version : 2.14.2
keywords:
- Postgres
use warnings;
use 5.006001;
-my $VERSION = '2.14.1';
+my $VERSION = '2.14.2';
if ($VERSION =~ /_/) {
print "WARNING! This is a test version ($VERSION) and should not be used in production!\n";
SHA1 34704b2a862f8ea670ed335230affc9ef3e3acb9 .perlcriticrc
SHA1 19f7436035c2dd1b1edc7bfdc138409d872338b0 MANIFEST
SHA1 92f9e28d28d95763cce24d588b19262efc7218f7 MANIFEST.SKIP
-SHA1 a7836851e1b720d874ab1e3a3d8bfe292d823f36 META.yml
-SHA1 0ead49d130f1461a496f7229d7045ee4b9003121 Makefile.PL
+SHA1 930ab275a8f88628a0c1935b8b6e4a22ec20e689 META.yml
+SHA1 b44a9cb5e3cbaee7f0a0b700cf1009ed3eda2960 Makefile.PL
SHA1 709742a5933a43cc3e82ee935cd63a45f176adda README
SHA1 6a627ce3f10fd9993b65210733d6098ef6a42dca TODO
-SHA1 54fa182fe52823058cec64dcc7c3bd07cd09bf56 check_postgres.pl
-SHA1 8bdb1ecfb303944074adfec2ab07f8be28103963 check_postgres.pl.asc
-SHA1 d65da965fc3c42b101ffaf3c9f868a9b996d421a check_postgres.pl.html
+SHA1 eeaf5e7d96e8da58e6e438e88c5eb99aaf2735d4 check_postgres.pl
+SHA1 d40000f8723d13df9f652ff544b91a70e38f6535 check_postgres.pl.asc
+SHA1 fa27b8ac7e397eab233030c36daf884ad1d08cd1 check_postgres.pl.html
SHA1 c3d239c75a507a0b4d5a245ea82fb2e7fe2869cd t/00_basic.t
SHA1 a29dcbcc2e34d409ad30e8f87b9c4c09db877c4e t/00_signature.t
SHA1 b3b833488dca6a766aa185c2457d361a978103cb t/00_test_tester.t
SHA1 058e1b59e21c039b6c79f0be3e1a6c2dbcbd5add t/CP_Testing.pm
-----BEGIN PGP SIGNATURE-----
-iEYEAREDAAYFAkt0KGkACgkQvJuQZxSWSsiPMACggMzdzcdaElmcfE7piKySSyr3
-o74AoLNlFbNei7TcDEhD8UsLRbGv+qHQ
-=C/Xg
+iEYEAREDAAYFAkt9uGAACgkQvJuQZxSWSsh4DACfd1KJKHDh0x9W2i//nqDM3utY
+qYwAoOnA+rOI3aaoLGDF0fxtoK4i99O0
+=lFFB
-----END PGP SIGNATURE-----
$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
-our $VERSION = '2.14.1';
+our $VERSION = '2.14.2';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
-This documents describes check_postgres.pl version 2.14.1
+This documents describes check_postgres.pl version 2.14.2
=head1 SYNOPSIS
=over 4
-=item B<Version 2.14.1> (February 18, 2010)
+=item B<Version 2.14.2> (February 18, 2010)
+
+ Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat)
+ Put all items one-per-line for relation size actions if --verbose=1
+
+=item B<Version 2.14.1> (February 17, 2010)
Don't use $^T in logfile check, as script may be long-running
Change the error string for the logfile action for easier exclusion
by programs like tail_n_mail
- Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat)
- Put all items one-per-line for relation size actions if --verbose=1
=item B<Version 2.14.0> (February 11, 2010)
-----BEGIN PGP SIGNATURE-----
-iEYEABEDAAYFAkt0KGYACgkQvJuQZxSWSsjPFgCfQUysAtW1k3yCJiHpGf7eOaKU
-Ye4AnA7dVovV35aHZ0vrzcRV39i9fg+s
-=zJIi
+iEYEABEDAAYFAkt9uFkACgkQvJuQZxSWSsi9xwCgi8RMixproWXizhkyw+HC/YE3
+YTwAnRjS9lcF71yq3DYeQ+MsQFLLcaKN
+=L+tl
-----END PGP SIGNATURE-----
<hr />
<h1><a name="name">NAME</a></h1>
<p><strong>check_postgres.pl</strong> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others</p>
-<p>This documents describes check_postgres.pl version 2.14.1</p>
+<p>This documents describes check_postgres.pl version 2.14.2</p>
<p>
</p>
<hr />
action will only work for databases version 8.2 or higher. The <em>--warning</em> and
<em>--critical</em> options should be expressed as percentages. The 'age' of the transactions
in each database is compared to the autovacuum_freeze_max_age setting (200 million by default)
-to generate a rounded percentage. The default values are <strong>105%</strong> for the warning and <strong>120%</strong> for
-the critical. Since autovacuum does not vacuum tables before they reach this limit, setting
-levels below 100% will return false positives. Databases can be filtered by use of the
-<em>--include</em> and <em>--exclude</em> options. See the <a href="#basic_filtering">BASIC FILTERING</a> section for more details.</p>
-<p>Example 1: Give a warning when any databases on port 5432 are above 100%</p>
+to generate a rounded percentage. The default values are <strong>90%</strong> for the warning and <strong>95%</strong> for
+the critical. Databases can be filtered by use of the <em>--include</em> and <em>--exclude</em> options.
+See the <a href="#basic_filtering">BASIC FILTERING</a> section for more details.</p>
+<p>Example 1: Give a warning when any databases on port 5432 are above 97%</p>
<pre>
- check_postgres_autovac_freeze --port=5432 --warning="100%"</pre>
+ check_postgres_autovac_freeze --port=5432 --warning="97%"</pre>
<p>For MRTG output, the highest overall percentage is reported on the first line, and the highest age is
reported on the second line. All databases which have the percentage from the first line are reported
on the fourth line, separated by a pipe symbol.</p>
<h1><a name="history">HISTORY</a></h1>
<p>Items not specifically attributed are by Greg Sabino Mullane.</p>
<dl>
-<dt><strong><a name="version_2_14_1" class="item"><strong>Version 2.14.1</strong></a></strong></dt>
+<dt><strong><a name="2" class="item"><strong>Version 2.14.2</strong> (February 18, 2010)</a></strong></dt>
+
+<dd>
+<pre>
+ Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat)
+ Put all items one-per-line for relation size actions if --verbose=1</pre>
+</dd>
+<dt><strong><a name="1" class="item"><strong>Version 2.14.1</strong> (February 17, 2010)</a></strong></dt>
<dd>
<pre>
Added the 'slony_status' action.
Changed the logfile sleep from 0.5 to 1, as 0.5 gets rounded to 0 on some boxes!</pre>
</dd>
-<dt><strong><a name="2" class="item"><strong>Version 2.13.2</strong> (February 4, 2010)</a></strong></dt>
+<dt><strong><strong>Version 2.13.2</strong> (February 4, 2010)</strong></dt>
<dd>
<pre>
Add 'noowner' option to same_schema action.
Raise sleep timeout for logfile check to 15 seconds.</pre>
</dd>
-<dt><strong><a name="1" class="item"><strong>Version 2.13.1</strong> (February 2, 2010)</a></strong></dt>
+<dt><strong><strong>Version 2.13.1</strong> (February 2, 2010)</strong></dt>
<dd>
<pre>