Fixed problem when examining items in pg_settings.
authorGreg Sabino Mullane <[email protected]>
Mon, 27 Dec 2010 16:43:09 +0000 (11:43 -0500)
committerGreg Sabino Mullane <[email protected]>
Mon, 27 Dec 2010 16:43:09 +0000 (11:43 -0500)
check_postgres.pl

index fb79e5944c92cd4a3131e9ed31feccfdfe47f58f..b5ff62de45b257b2e7778fd78a1a9259da14da5a 100755 (executable)
@@ -30,7 +30,7 @@ $Data::Dumper::Varname = 'POSTGRES';
 $Data::Dumper::Indent = 2;
 $Data::Dumper::Useqq = 1;
 
-our $VERSION = '2.15.0';
+our $VERSION = '2.15.1';
 
 use vars qw/ %opt $PSQL $res $COM $SQL $db /;
 
@@ -2116,7 +2116,7 @@ sub verify_version {
         if (!defined $info2->{db}[0]) {
             ndie msg('die-nosetting', $setting);
         }
-        my $val = $info2->{db}[0]{slurp};
+        my $val = $info2->{db}[0]{slurp}[0]{setting};
         if ($val !~ /^\s*on\b/) {
             ndie msg('die-noset', $action, $setting);
         }
@@ -7164,7 +7164,7 @@ sub check_archive_ready {
 
 B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
 
-This documents describes check_postgres.pl version 2.15.0
+This documents describes check_postgres.pl version 2.15.1
 
 =head1 SYNOPSIS
 
@@ -8747,6 +8747,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
+=item B<Version 2.15.1>
+
+  Fix problem when examining items in pg_settings (Greg Sabino Mullane)
+
 =item B<Version 2.15.0>
 
   Add --quiet argument to surpress output on OK Nagios results