[check_postgres] [commit] Minor version bump: stop checking datallowconn false databases for "autovac_freeze"

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Jul 22 21:12:08 UTC 2008


Committed by Greg Sabino Mullane <greg at endpoint.com>

Minor version bump: stop checking datallowconn false databases for "autovac_freeze"

---
 check_postgres.pl      |   12 ++++++++----
 check_postgres.pl.asc  |    6 +++---
 check_postgres.pl.html |   10 ++++++++--
 index.html             |    6 +++---
 4 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index 3a46c23..55fc0b5 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -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.
diff --git a/check_postgres.pl.asc b/check_postgres.pl.asc
index ffe4c9c..5c0ae15 100644
--- a/check_postgres.pl.asc
+++ b/check_postgres.pl.asc
@@ -1,6 +1,6 @@
 -----BEGIN PGP SIGNATURE-----
 
-iEYEABEDAAYFAkiBFBwACgkQvJuQZxSWSsh2ogCg8N9tFF36rav3BQUunGu/dZqH
-mQ0AoMjFXIohylKK6/2ntFGrfWA9rkHl
-=tTkw
+iEYEABEDAAYFAkiGTP4ACgkQvJuQZxSWSshsXQCfQhu/z5exJzUID5fOkOjo/UnL
+y3UAninWfRntPEFr217rPbKWTz6SMYMH
+=7T6u
 -----END PGP SIGNATURE-----
diff --git a/check_postgres.pl.html b/check_postgres.pl.html
index 5d6f8fc..564b859 100644
--- a/check_postgres.pl.html
+++ b/check_postgres.pl.html
@@ -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.
diff --git a/index.html b/index.html
index 2f6825d..ab90704 100644
--- a/index.html
+++ b/index.html
@@ -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>
 
-- 
1.5.5.4



More information about the Check_postgres mailing list