From: Andreas Mager Date: Wed, 7 Apr 2010 15:34:23 +0000 (-0400) Subject: Fix custom logic. X-Git-Tag: 2.15.1~55 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js%3Cscript%20data-cfasync=?a=commitdiff_plain;h=56b1a6fe95c368f641f6ea882731f74115db2d2b;p=check_postgres.git Fix custom logic. --- 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'); } }