rhuss / jmx4perl

JMX access tools and modules
http://search.cpan.org/~roland/jmx4perl/
Other
45 stars 12 forks source link

Error when doing string comparison #54

Open nandersson opened 8 years ago

nandersson commented 8 years ago

We're receiving the following error when calling check_jmx4perl from op5:

check_jmx4perl -u http://x.x.x.x:9000/jolokia --config config.cfg --method=post --check application_display_name --string App 'App-1.0.0-e61f3ebb7ac5170f516a5e6beacbb2bf38ae5ea8'
Result code: WARNING
ERROR OUTPUT:
Argument "App-1.0.0-e61f3ebb7ac5170f516a5e6beacbb2bf38ae5e..." isn't numeric in sprintf at /usr/local/share/perl5/JMX/Jmx4Perl/Nagios/SingleCheck.pm line 435.
====================
STANDARD OUTPUT:
JMX4PERL WARNING - App-1.0.0-e61f3ebb7ac5170f516a5e6beacbb2bf38ae5ea8

Our check is defined as:

<Check application_display_name>
  MBean = Catalina:context=/$0,host=localhost,type=NamingResources
  Attribute = container
  Path = displayName
  Name = Display Name
  Label = %v
  Warning = !$1
</Check>

We're running with the latest version 1.12.

I'm expecting the check to return OK, but it is not unfortunately. I thought adding --string would solve it, but it didn't change anything.

guyburton commented 7 years ago

Also being hit by this issue- is there any known workaround?