summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
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');