summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin/Performance.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Nagios/Plugin/Performance.pm')
-rw-r--r--lib/Nagios/Plugin/Performance.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Nagios/Plugin/Performance.pm b/lib/Nagios/Plugin/Performance.pm
index 6b85dc0..9248fea 100644
--- a/lib/Nagios/Plugin/Performance.pm
+++ b/lib/Nagios/Plugin/Performance.pm
@@ -87,7 +87,14 @@ sub parse_perfstring {
87 # If there is more than 1 equals sign, split it out and parse individually 87 # If there is more than 1 equals sign, split it out and parse individually
88 if (@{[$perfstring =~ /=/g]} > 1) { 88 if (@{[$perfstring =~ /=/g]} > 1) {
89 $perfstring =~ s/^(.*?=.*?)\s//; 89 $perfstring =~ s/^(.*?=.*?)\s//;
90 $obj = $class->_parse($1); 90 if (defined $1) {
91 $obj = $class->_parse($1);
92 } else {
93 # This could occur if perfdata was soemthing=value=
94 # Since this is invalid, we reset the string and continue
95 $perfstring = "";
96 $obj = $class->_parse($perfstring);
97 }
91 } else { 98 } else {
92 $obj = $class->_parse($perfstring); 99 $obj = $class->_parse($perfstring);
93 $perfstring = ""; 100 $perfstring = "";