Patch to avoid perfdatas like those :
metric=,,!true
metric=1000,1:,2:
Maybe bad code, I'm not a Perl-developer.
--- /usr/local/share/perl/5.10.1/JMX/Jmx4Perl/Nagios/SingleCheck.pm.old
2012-07-13 17:13:56.000000000 +0200
+++ /usr/local/share/perl/5.10.1/JMX/Jmx4Perl/Nagios/SingleCheck.pm
2012-07-13 17:26:45.000000000 +0200
@@ -158,10 +158,14 @@
# Performance data. Convert to absolute values before
my ($critical,$warning) =
$self->_convert_relative_to_absolute($base_value,$self->critical,$self->warning);
- $np->add_perfdata(label => $label,value => $value,
- critical => $critical,warning => $warning,
+ {
+ no warnings 'numeric';
+ no warnings 'uninitialized';
+ $np->add_perfdata(label => $label,value => $value,
+ critical => $critical + 0,warning => $warning + 0,
min => 0,max => $base_value,
$self->unit ? (uom => $self->unit) : ());
+ }
# Do the real check.
my ($code,$mode) = $self->_check_threshhold($rel_value);
# For Multichecks, we remember the label of a currently failed check
@@ -172,9 +176,13 @@
base_unit => $base_unit, prefix => $opts->{prefix}));
} else {
# Performance data
- $np->add_perfdata(label => $label,
- critical => $self->critical, warning => $self->warning,
+ {
+ no warnings 'numeric';
+ no warnings 'uninitialized';
+ $np->add_perfdata(label => $label,
+ critical => $self->critical + 0, warning => $self->warning + 0,
value => $value,$self->unit ? (uom => $self->unit) : ());
+ }
# Do the real check.
my ($code,$mode) = $self->_check_threshhold($value);
Thanks !