summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorAndreas Mager2010-04-07 15:34:23 +0000
committerGreg Sabino Mullane2010-04-07 15:34:23 +0000
commit56b1a6fe95c368f641f6ea882731f74115db2d2b (patch)
tree2358e210a6fae7782c8c02c4c2db2d93accdded7 /check_postgres.pl
parent24cf5333a620db0330d272c49141d72d77c7c32b (diff)
Fix custom logic.
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');
}
}