$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
-our $VERSION = '2.1.0';
+our $VERSION = '2.1.1';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
my $SQL = q{SELECT freez, txns, ROUND(100*(txns/freez::float)) AS perc, datname}.
q{ FROM (SELECT foo.freez::int, age(datfrozenxid) AS txns, datname}.
q{ FROM pg_database d JOIN (SELECT setting AS freez FROM pg_settings WHERE name = 'autovacuum_freeze_max_age') AS foo}.
- q{ ON (true)) AS foo2 ORDER BY 3 DESC, 4 ASC};
+ q{ ON (true) WHERE d.datallowconn) AS foo2 ORDER BY 3 DESC, 4 ASC};
my $info = run_command($SQL, {regex => qr[\w+] } );
for $db (@{$info->{db}}) {
default_critical => 1_400_000_000,
});
- $SQL = q{SELECT datname, age(datfrozenxid) FROM pg_database WHERE datallowconn is true ORDER BY 2 desc, 1};
+ $SQL = q{SELECT datname, age(datfrozenxid) FROM pg_database WHERE datallowconn ORDER BY 2 desc, 1};
my $info = run_command($SQL, { regex => qr[\w+\s+\|\s+\d+] } );
my ($max,$maxmsg) = (0,'?');
=head1 VERSION
-This documents describes B<check_postgres.pl> version 2.1.0
+This documents describes B<check_postgres.pl> version 2.1.1
=head1 SYNOPSIS
=over 4
+=item B<Version 2.1.1> (July 22, 2008)
+
+Don't check databases with datallowconn false for the "autovac_freeze" action.
+
=item B<Version 2.1.0> (July 18, 2008)
Add the "autovac_freeze" action, thanks to Robert Treat for the idea and design.
-----BEGIN PGP SIGNATURE-----
-iEYEABEDAAYFAkiBFBwACgkQvJuQZxSWSsh2ogCg8N9tFF36rav3BQUunGu/dZqH
-mQ0AoMjFXIohylKK6/2ntFGrfWA9rkHl
-=tTkw
+iEYEABEDAAYFAkiGTP4ACgkQvJuQZxSWSshsXQCfQhu/z5exJzUID5fOkOjo/UnL
+y3UAninWfRntPEFr217rPbKWTz6SMYMH
+=7T6u
-----END PGP SIGNATURE-----
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
-<p>This documents describes <strong>check_postgres.pl</strong> version 2.1.0</p>
+<p>This documents describes <strong>check_postgres.pl</strong> version 2.1.1</p>
<p>
</p>
<hr />
<h1><a name="history">HISTORY</a></h1>
<p>Items not specifically attributed are by Greg Sabino Mullane.</p>
<dl>
+<dt><strong><a name="1" class="item"><strong>Version 2.1.1</strong> (July 22, 2008)</a></strong>
+
+<dd>
+<p>Don't check databases with datallowconn false for the "autovac_freeze" action.</p>
+</dd>
+</li>
<dt><strong><a name="0" class="item"><strong>Version 2.1.0</strong> (July 18, 2008)</a></strong>
<dd>
Put an ORDER BY on the "txn_wraparound" action.</p>
</dd>
</li>
-<dt><strong><a name="1" class="item"><strong>Version 2.0.1</strong> (July 16, 2008)</a></strong>
+<dt><strong><strong>Version 2.0.1</strong> (July 16, 2008)</strong>
<dd>
<p>Optimizations to speed up the "bloat" action quite a bit.
<h1>check_postgres.pl</h1>
-<p><b>check_postgres.pl</b> is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.1.0</b>, and was released on July 18, 2008.</p>
+<p><b>check_postgres.pl</b> is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.1.1</b>, and was released on July 22, 2008.</p>
<ul>
- <li><a href="/check_postgres/check_postgres.pl.html">Documentation for check_postgres 2.1.0</a></li>
+ <li><a href="/check_postgres/check_postgres.pl.html">Documentation for check_postgres 2.1.1</a></li>
</ul>
<ul>
- <li><a href="/check_postgres/check_postgres.pl">Download check_postgres.pl 2.1.0</a></li>
+ <li><a href="/check_postgres/check_postgres.pl">Download check_postgres.pl 2.1.1</a></li>
<li><a href="/check_postgres/check_postgres.pl.asc">PGP signature for check_postgres.pl</a></li>
</ul>