Skip Menu |

This queue is for tickets about the jmx4perl CPAN distribution.

Report information
The Basics
Id: 100828
Status: open
Priority: 0/
Queue: jmx4perl

People
Owner: Nobody in particular
Requestors: Mathieu.WINGEL [...] sihm.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: jmx4perl : issue on check_jmx4perl
Date: Wed, 10 Dec 2014 13:19:54 +0000
To: "bug-jmx4perl [...] rt.cpan.org" <bug-jmx4perl [...] rt.cpan.org>
From: WINGEL Mathieu <Mathieu.WINGEL [...] sihm.fr>
Hello, I'm using check_jmx4perl version 1.10 on CentOs 5.10, perl 5.8.8 When I use the following command, it should answer with a critical : [nagios@FPS37ETU1 ]# check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State --warning 1 --critical 0 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXX OK - test : Value 0 in range | test=0;1;0 My need is to raise a critical when the result is different than 0. According to the doc on cpan, it's better to convert the result in a string and add a leading '!' character to do so. But to highlight the problem, I just check against 0. Still, no critical answer is raised: [nagios@FPS37ETU1 ]# check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State --string --warning 1 --critical 0 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXXX --perfdata on OK - test : '0' as expected | test=0;1;0 I have the same result using a similar mbean : com.bea:Name=portail_ppd1,Type=ServerRuntime/HealthState/State. However, the check works well on simple attributes with an integer type. Maybe the ckeck doesn't work the same way when attributes are complex ( classes ) as it's the case here. Thanks for your help. Cordialement, Mathieu Wingel Ingénieur Production Direction Production [cid:image003.jpg@01CE7F11.9BB11B50] 41 rue Fabienne Landy 37700 Saint Pierre des Corps Tél. 02 47 46 58 87 mathieu.wingel@sihm.fr<mailto:prenom.nom@sihm.fr> En harmonie avec votre santé
Download image001.png
image/png 6.8k
image001.png
What's about using 0:0 as threshold (as explained here: https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT)
Subject: RE: [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl
Date: Wed, 10 Dec 2014 13:35:34 +0000
To: "bug-jmx4perl [...] rt.cpan.org" <bug-jmx4perl [...] rt.cpan.org>
From: WINGEL Mathieu <Mathieu.WINGEL [...] sihm.fr>
Same thing: [nagios@FPS37ETU1 ]# check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State --critical 0:0 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXX OK - test : Value 0 in range | test=0;;0:0 Mathieu -----Message d'origine----- De : Roland Huss via RT [mailto:bug-jmx4perl@rt.cpan.org] Envoyé : mercredi 10 décembre 2014 14:32 À : WINGEL Mathieu Objet : [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl <URL: https://rt.cpan.org/Ticket/Display.html?id=100828 > What's about using 0:0 as threshold (as explained here: https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT) ?
Initially you said, that you need raise a critical when the value is different from 0. So IMO the output of your example is ok, since the value is 0. 
If you want to check for 0 being not ok, then you should try ~:0 (assuming that tge status is always positive).

Am Mi 10. Dez 2014, 08:35:44, Mathieu.WINGEL@sihm.fr schrieb:
Show quoted text
> Same thing:
>
> [nagios@FPS37ETU1 ]# check_jmx4perl --url
> http://localhost:8080/jolokia --name test --value
> com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State
> --critical 0:0 --target
> service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime
> --target-user=monitor --target-password=XXXXX
> OK - test : Value 0 in range | test=0;;0:0
>
>
>
> Mathieu
>
> -----Message d'origine-----
> De : Roland Huss via RT [mailto:bug-jmx4perl@rt.cpan.org]
> Envoyé : mercredi 10 décembre 2014 14:32
> À : WINGEL Mathieu
> Objet : [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl
>
> <URL: https://rt.cpan.org/Ticket/Display.html?id=100828 >
>
> What's about using 0:0 as threshold (as explained here:
> https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT) ?
>


Subject: RE: [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl
Date: Wed, 10 Dec 2014 15:03:48 +0000
To: "bug-jmx4perl [...] rt.cpan.org" <bug-jmx4perl [...] rt.cpan.org>
From: WINGEL Mathieu <Mathieu.WINGEL [...] sihm.fr>
You are right about this. However it seems that the check, in this case, doesn't seem to bother about the warning and critical thresholds. How can I be sure it will correctly understand values like 0:0 or ~:0 when it appears ? Here's a example with a different mbean: [nagios@FPS37ETU1 ]# check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OpenSocketsCurrentCount --critical 7 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXXXX OK - test : Value 6 in range | test=6;;7 [nagios@FPS37ETU1 ]# check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OpenSocketsCurrentCount --critical 0 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXXX CRITICAL - test : Threshold '0' failed for value 6 | test=6;;0 And it works fine! I believe something's wrong when the structure of the attribute is complex (see attached screen capture ): With mbean com.bea:Name=portail_ppd1,Type=ServerRuntime/OpenSocketsCurrentCount: the check gets the value (6) and make the check against the threshold ok. With mbean com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State: The check gets the value (0) but the check is wrong against the threshold. if you delete the "path" in the value field, you can see that the attribute is a HASH: check_jmx4perl --url http://localhost:8080/jolokia --name test --value com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState --critical 0 --target service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers.runtime --target-user=monitor --target-password=XXXXXX UNKNOWN - Response value is a HASH, not a plain value. Did you forget a --path parameter ? Value: $VAR1 = { 'critical' => 'true', 'mBeanName' => 'portail_ppd1', 'mBeanType' => 'ServerRuntime', 'subsystemName' => 'ServerRuntime', 'reasonCode' => '[Ljava.lang.String;@2dbe4ff2', 'state' => '0' }; Hope this helps. Cordialement, Mathieu Wingel Ingénieur Production Direction Production 41 rue Fabienne Landy 37700 Saint Pierre des Corps Tél. 02 47 46 58 87 mathieu.wingel@sihm.fr En harmonie avec votre santé -----Message d'origine----- De : Roland Huss via RT [mailto:bug-jmx4perl@rt.cpan.org] Envoyé : mercredi 10 décembre 2014 14:41 À : WINGEL Mathieu Objet : [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl <URL: https://rt.cpan.org/Ticket/Display.html?id=100828 > Initially you said, that you need raise a critical when the value is different from 0. So IMO the output of your example is ok, since the value is 0. If you want to check for 0 being not ok, then you should try ~:0 (assuming that tge status is always positive). Am Mi 10. Dez 2014, 08:35:44, Mathieu.WINGEL@sihm.fr schrieb: Show quoted text
> Same thing: > > [nagios@FPS37ETU1 ]# check_jmx4perl --url > http://localhost:8080/jolokia --name test --value > com.bea:Name=portail_ppd1,Type=ServerRuntime/OverallHealthState/State > --critical 0:0 --target > service:jmx:t3://mhm37ppd1:7011/jndi/weblogic.management.mbeanservers. > runtime --target-user=monitor --target-password=XXXXX OK - test : > Value 0 in range | test=0;;0:0 > > > > Mathieu > > -----Message d'origine----- > De : Roland Huss via RT [mailto:bug-jmx4perl@rt.cpan.org] Envoyé : > mercredi 10 décembre 2014 14:32 À : WINGEL Mathieu Objet : > [rt.cpan.org #100828] jmx4perl : issue on check_jmx4perl > > <URL: https://rt.cpan.org/Ticket/Display.html?id=100828 > > > What's about using 0:0 as threshold (as explained here: > https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT) ? >
Download check_jmx4perl.jpg
image/jpeg 10.7k

Message body is not shown because sender requested not to inline it.