diff options
author | Greg Sabino Mullane | 2008-07-22 21:11:30 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2008-07-22 21:11:30 +0000 |
commit | f22f65efc094b4f7a0a4e472bc1696f0613db3ba (patch) | |
tree | 85eac73aa7eb112934814f3a4996ed3840298250 /check_postgres.pl | |
parent | bdd69d3a9c9bbfd1afe40882b0291b479a741483 (diff) |
Minor version bump: stop checking datallowconn false databases for "autovac_freeze"
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 3a46c230b..55fc0b50d 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. |