summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorJeff Boes2009-04-23 20:37:58 +0000
committerJeff Boes2009-04-23 22:03:06 +0000
commit2b0cca8250536ac21c411bbf17648d9ede062b69 (patch)
treedadb09a26d04cf5193af654ec410294ffef8b074 /check_postgres.pl
parent19acfdcd940028c4052f6d84dd33cd4d36c9597e (diff)
Initial cut, 'disabled_triggers' tests
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 99c406c9b..c01aa3383 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1928,10 +1928,18 @@ sub validate_range {
if (length $warning and $warning !~ /^\d+$/) {
ndie $type =~ /positive/ ? msg('range-int-pos', 'warning') : msg('range-int', 'warning');
}
+ elsif (length $warning && $type =~ /positive/ && $warning <= 0) {
+ ndie msg('range-int-pos', 'warning');
+ }
+
$critical =~ s/_//g;
if (length $critical and $critical !~ /^\d+$/) {
ndie $type =~ /positive/ ? msg('range-int-pos', 'critical') : msg('range-int', 'critical');
}
+ elsif (length $critical && $type =~ /positive/ && $critical <= 0) {
+ ndie msg('range-int-pos', 'critical');
+ }
+
if (length $warning and length $critical and $warning > $critical) {
return if $opt{reverse};
ndie msg('range-warnbig');