From 9baf47fca4504eed07b91e84f189ccebe80da6f9 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Tue, 12 Sep 2017 14:05:12 +0200 Subject: [PATCH] fix 0 values in jmx list attributes --- .../centreon/common/protocols/jmx/custom/jolokia.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm b/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm index d2dfaca51..fb1f83915 100644 --- a/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm +++ b/centreon-plugins/centreon/common/protocols/jmx/custom/jolokia.pm @@ -292,7 +292,8 @@ sub list_attributes { $v =~ s/^\s*//; print " = " . $v; } else { - if (my $scal = JMX::Jmx4Perl::Util->dump_scalar($val)) { + my $scal = JMX::Jmx4Perl::Util->dump_scalar($val); + if (defined($scal)) { print " = " . $scal . "\n"; } else { print " = undef\n"; @@ -367,4 +368,4 @@ Credentials to use for the target B. -=cut \ No newline at end of file +=cut