diff options
author | Andreas Mager | 2010-04-07 15:34:23 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2010-04-07 15:34:23 +0000 |
commit | 56b1a6fe95c368f641f6ea882731f74115db2d2b (patch) | |
tree | 2358e210a6fae7782c8c02c4c2db2d93accdded7 /check_postgres.pl | |
parent | 24cf5333a620db0330d272c49141d72d77c7c32b (diff) |
Fix custom logic.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index c6522c9b2..1c306f266 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2238,8 +2238,14 @@ sub validate_range { ndie msg('range-int-pos', 'critical'); } - if (length $warning and length $critical and $warning > $critical) { - return if $opt{reverse}; + if (length $warning + and length $critical + and ( + ($opt{reverse} and $warning < $critical) + or + (!$opt{reverse} and $warning > $critical) + ) + ) { ndie msg('range-warnbig'); } } |