Minor version bump: stop checking datallowconn false databases for "autovac_freeze"
authorGreg Sabino Mullane <[email protected]>
Tue, 22 Jul 2008 21:11:30 +0000 (17:11 -0400)
committerGreg Sabino Mullane <[email protected]>
Tue, 22 Jul 2008 21:11:30 +0000 (17:11 -0400)
check_postgres.pl
check_postgres.pl.asc
check_postgres.pl.html
index.html

index 3a46c230bbd5b0b0e2d7115dc026f4204af72112..55fc0b50d8064a57802b7d1f55fa02753714e0e0 100755 (executable)
@@ -28,7 +28,7 @@ $Data::Dumper::Varname = 'POSTGRES';
 $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 /;
 
@@ -1305,7 +1305,7 @@ sub check_autovac_freeze {
        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}}) {
@@ -2958,7 +2958,7 @@ sub check_txn_wraparound {
                  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,'?');
@@ -3261,7 +3261,7 @@ check_postgres.pl - Postgres monitoring script for Nagios, MRTG, and others
 
 =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
 
@@ -4327,6 +4327,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =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.
index ffe4c9c63ea33a0e3ca638e69bf6c218de312f12..5c0ae1579105b3edca039cef221c429e89f19d49 100644 (file)
@@ -1,6 +1,6 @@
 -----BEGIN PGP SIGNATURE-----
 
-iEYEABEDAAYFAkiBFBwACgkQvJuQZxSWSsh2ogCg8N9tFF36rav3BQUunGu/dZqH
-mQ0AoMjFXIohylKK6/2ntFGrfWA9rkHl
-=tTkw
+iEYEABEDAAYFAkiGTP4ACgkQvJuQZxSWSshsXQCfQhu/z5exJzUID5fOkOjo/UnL
+y3UAninWfRntPEFr217rPbKWTz6SMYMH
+=7T6u
 -----END PGP SIGNATURE-----
index 5d6f8fcfedd57c4aeed7aacc493def4d4b0dc581..564b85931cecdfa43d9f44e8d7dce9f3ec3763e1 100644 (file)
@@ -63,7 +63,7 @@
 </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 />
@@ -1367,6 +1367,12 @@ feature requests, and commit notices, send email to <a href="mailto:check_postgr
 <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 &quot;autovac_freeze&quot; action.</p>
+</dd>
+</li>
 <dt><strong><a name="0" class="item"><strong>Version 2.1.0</strong> (July 18, 2008)</a></strong>
 
 <dd>
@@ -1374,7 +1380,7 @@ feature requests, and commit notices, send email to <a href="mailto:check_postgr
 Put an ORDER BY on the &quot;txn_wraparound&quot; 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 &quot;bloat&quot; action quite a bit.
index 2f6825d84415a0f313697d9d321afb2f20eb5b7f..ab90704cd03ee004d02684711b4050d7b35f4700 100644 (file)
@@ -21,13 +21,13 @@ h1 {
 
 <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>