diff options
author | Kabalin, Ruslan | 2010-05-19 20:48:04 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2010-05-19 20:48:04 +0000 |
commit | 4bd4cc2f956667af08b4817f7f4f4ee64393e703 (patch) | |
tree | 631870071f2179c3fa7c826b452fb2a27a04783b /check_postgres.pl | |
parent | 697d759b2abcde46f4d5f1b532402f3cadeedd8f (diff) |
Fix logic for backends check with negative numbers.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index d9699d819..089ff12ab 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2638,8 +2638,9 @@ ORDER BY datname my $percent = (int $total / $limit*100) || 1; my $msg = msg('backends-msg', $total, $limit, $percent); my $ok = 1; + if ($e1) { ## minus - $ok = 0 if $limit-$total >= $e2; + $ok = 0 if $limit-$total <= $e2; } elsif ($e3) { ## percent my $nowpercent = $total/$limit*100; @@ -2654,7 +2655,7 @@ ORDER BY datname } if ($w1) { - $ok = 0 if $limit-$total >= $w2; + $ok = 0 if $limit-$total <= $w2; } elsif ($w3) { my $nowpercent = $total/$limit*100; |