From: Greg Sabino Mullane Date: Mon, 2 Jun 2008 16:22:24 +0000 (-0400) Subject: Sometimes our own query does not occur, so simply assume a max of 0 and ignore no... X-Git-Tag: 2.9.0~326 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=75a3eb6589153ae722b8e1ecd9db4ea8848d7b15;p=check_postgres.git Sometimes our own query does not occur, so simply assume a max of 0 and ignore no results. --- diff --git a/check_postgres.pl b/check_postgres.pl index 0a8596a96..8d8822554 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2193,17 +2193,13 @@ sub check_query_time { next; } - my $max = -1; + my $max = 0; SLURP: while ($db->{slurp} =~ /(.+?)\s+\|\s+(\d+)\s*/gsm) { my ($dbname,$current) = ($1,$2); next SLURP if skip_item($dbname); $max = $current if $current > $max; } $db->{perf} .= " maxtime:$max"; - if ($max < 0) { - add_unknown 'T-EXCLUDE-DB'; - next; - } my $msg = qq{longest query: ${max}s}; if (length $critical and $max >= $critical) {