summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin/Threshold.pm
diff options
context:
space:
mode:
authorTon Voon <tonvoon@macbook.local>2009-03-03 10:36:02 +0000
committerTon Voon <tonvoon@macbook.local>2009-03-03 10:36:02 +0000
commitb0ff1e4262fa7f09c9cdb91206b6d2a2a1aa06a7 (patch)
tree2637e1eb1fbb9d09b7f4c5c97affaad1411b19f7 /lib/Nagios/Plugin/Threshold.pm
parentc4f93de55930896e83d3abb519190704332b4e8f (diff)
downloadmonitoring-plugin-perl-b0ff1e4262fa7f09c9cdb91206b6d2a2a1aa06a7.tar.gz
Added parsing of labels with spaces (thanks to Kang)
Diffstat (limited to 'lib/Nagios/Plugin/Threshold.pm')
-rw-r--r--lib/Nagios/Plugin/Threshold.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Nagios/Plugin/Threshold.pm b/lib/Nagios/Plugin/Threshold.pm
index 145b89f..73fce53 100644
--- a/lib/Nagios/Plugin/Threshold.pm
+++ b/lib/Nagios/Plugin/Threshold.pm
@@ -39,6 +39,9 @@ sub _inflate
39 return $value; 39 return $value;
40 } 40 }
41 41
42 # Another quick exit if $value is an empty string
43 return Nagios::Plugin::Range->new if $value eq "";
44
42 # Otherwise parse $value 45 # Otherwise parse $value
43 my $range = Nagios::Plugin::Range->parse_range_string($value); 46 my $range = Nagios::Plugin::Range->parse_range_string($value);
44 nagios_die("Cannot parse $key range: '$value'") unless(defined($range)); 47 nagios_die("Cannot parse $key range: '$value'") unless(defined($range));