summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Monitoring/Plugin/Performance.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Monitoring/Plugin/Performance.pm b/lib/Monitoring/Plugin/Performance.pm
index f1e7a16..0871042 100644
--- a/lib/Monitoring/Plugin/Performance.pm
+++ b/lib/Monitoring/Plugin/Performance.pm
@@ -64,9 +64,16 @@ sub perfoutput {
64 if ($label =~ / /) { 64 if ($label =~ / /) {
65 $label = "'$label'"; 65 $label = "'$label'";
66 } 66 }
67
68 my $value = $self->value;
69 # To prevent invalid output, we change empty value to value "U"
70 if ($value eq '') {
71 $value = 'U';
72 }
73
67 my $out = sprintf "%s=%s%s;%s;%s;%s;%s", 74 my $out = sprintf "%s=%s%s;%s;%s;%s;%s",
68 $label, 75 $label,
69 $self->value, 76 $value,
70 $self->_nvl($self->uom), 77 $self->_nvl($self->uom),
71 $self->_nvl($self->warning), 78 $self->_nvl($self->warning),
72 $self->_nvl($self->critical), 79 $self->_nvl($self->critical),