From: Greg Sabino Mullane Date: Fri, 5 Feb 2010 15:18:49 +0000 (-0500) Subject: Allow timeout option to be used as sleep amount in logfile action. X-Git-Tag: 2.14.0~5 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=6fe1a74178595d11ebe056be61b494d16a741540;p=check_postgres.git Allow timeout option to be used as sleep amount in logfile action. --- diff --git a/check_postgres.pl b/check_postgres.pl index 9174dc2d9..0a93be4b4 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.13.2'; +our $VERSION = '2.13.3'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -3763,7 +3763,7 @@ sub check_logfile { delete @{$db}{qw(ok slurp totaltime)}; my $badinfo = run_command("$funky", {failok => 1, target => $db} ); - my $MAXSLEEPTIME = 30; + my $MAXSLEEPTIME = $opt{timeout} || 45; my $SLEEP = 0.5; my $found = 0; LOGWAIT: { @@ -6511,7 +6511,7 @@ sub show_dbstats { B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.13.2 +This documents describes check_postgres.pl version 2.13.3 =head1 SYNOPSIS @@ -7979,6 +7979,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B (February 4, 2010) + + Allow timeout option to be used for logtime 'sleep' time. + =item B (February 4, 2010) Show offending database for query_time action.