summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl10
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');
}
}