diff options
author | Ton Voon <tonvoon@macbook.local> | 2009-03-03 10:36:02 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@macbook.local> | 2009-03-03 10:36:02 +0000 |
commit | b0ff1e4262fa7f09c9cdb91206b6d2a2a1aa06a7 (patch) | |
tree | 2637e1eb1fbb9d09b7f4c5c97affaad1411b19f7 /lib/Nagios/Plugin/Threshold.pm | |
parent | c4f93de55930896e83d3abb519190704332b4e8f (diff) | |
download | monitoring-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.pm | 3 |
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)); |