From 1a8b6cd4a8aa7377b98806a526bd1ea7982a484d Mon Sep 17 00:00:00 2001 From: Remi Broemeling Date: Tue, 23 Jul 2013 11:32:55 -0600 Subject: [PATCH] Fix string thresholds: they had been forced to upper-case, which guaranteed that you could never match a non-uppercased value. --- check_redis.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_redis.pl b/check_redis.pl index 1cff77c..48ffee3 100755 --- a/check_redis.pl +++ b/check_redis.pl @@ -1651,7 +1651,7 @@ sub parse_thresholds_list { else { foreach $t (@tin) { $t2 = uc $t; - if ($t2 =~ /^WARN\:(.*)/) { + if ($t =~ /^WARN\:(.*)/i) { if (defined($self)) { $thres->{'WARN'} = $self->parse_threshold($1); } @@ -1659,7 +1659,7 @@ sub parse_thresholds_list { $thres->{'WARN'} = parse_threshold($1); } } - elsif ($t2 =~ /^CRIT\:(.*)/) { + elsif ($t =~ /^CRIT\:(.*)/i) { if (defined($self)) { $thres->{'CRIT'} = $self->parse_threshold($1); }