diff options
author | Andreas Mager | 2010-04-07 15:34:23 +0000 |
---|---|---|
committer | Andy Lester | 2010-04-07 16:44:18 +0000 |
commit | f51554366cb3325b549e27db4828b496727c4994 (patch) | |
tree | 0724c712c4eccaa297da5c8433bcb53f559f90a8 | |
parent | 39b60b20bf55f16b1e7ac07ee708c53f33803eec (diff) |
Fix custom logic.
-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 0d4813b1d..faec760df 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2248,8 +2248,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'); } } |