From 56b1a6fe95c368f641f6ea882731f74115db2d2b Mon Sep 17 00:00:00 2001 From: Andreas Mager Date: Wed, 7 Apr 2010 11:34:23 -0400 Subject: Fix custom logic. --- check_postgres.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'check_postgres.pl') 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'); } } -- cgit v1.2.3