summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_postgres.pl10
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');
}
}