From 89746d01dfca745916150b35388da582b95b7774 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 7 Apr 2010 14:46:14 -0400 Subject: [PATCH] Fix some old code paths so the txn_idle tests work again. --- check_postgres.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check_postgres.pl b/check_postgres.pl index f331770da..eafdea1aa 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -6611,12 +6611,12 @@ sub check_txn_idle { $max = $current if $current > $max; } if ($MRTG) { - $stats{$db->{dbname}} = $max; + $stats{$db->{dbname}} = $max < 0 ? 0 : $max; next; } $db->{perf} .= msg('maxtime', $max); if ($max < 0) { - add_unknown 'T-EXCLUDE-DB'; + add_unknown msg('txnidle-none'); next; } @@ -6710,7 +6710,6 @@ WHERE xact_start IS NOT NULL $USERWHERECLAUSE ## Use of skip_item means we may have no matches if ($maxdb eq '?') { if ($USERWHERECLAUSE) { ## needed? - #add_unknown 'T-EXCLUDE-DB'; add_unknown msg('tttt-nomatch'); } else { -- 2.39.5