Page 1 of 1
check_jmx Decimal Places
Posted: Mon Apr 17, 2017 11:09 am
by ckiernan
I've been using check_jmx to monitor Kafka successfully but just noticed that it only returns whole numbers. This just became a problem for me. We have some metrics that are typically between 0 and 1 (e.g. .80172). I'd like to be able to graph these decimals. I've searched and can't find any topic on this.
Thanks,
Chris
Re: check_jmx Decimal Places
Posted: Mon Apr 17, 2017 11:19 am
by mcapra
This would likely involve some modifications to how jmxquery.jar works. Can you share the current check you're using executed from the CLI as well as its output?
Re: check_jmx Decimal Places
Posted: Mon Apr 17, 2017 11:53 am
by ckiernan
./check_jmx -U service:jmx:rmi:///jndi/rmi://<ip>:9999/jmxrmi -O kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent -A MeanRate -vvvv -w 50 -c 100
JMX OK MeanRate=0 | MeanRate=0
The actual value when viewed through jconsole at the same time is 0.97801
Re: check_jmx Decimal Places
Posted: Mon Apr 17, 2017 12:32 pm
by mcapra
Try replacing your jmxquery.jar and check_jmx with this updated one:
https://github.com/WillPlatnick/jmxquery/
It's receiving the checkData as an Object rather than a long, which I
think should fix the problem. It also uses the compare function when assessing thresholds, which I think should resolve doubles (-w 0.5 -c 0.9) correctly.
Let us know if that doesn't work.
Re: check_jmx Decimal Places
Posted: Thu Apr 20, 2017 8:42 am
by ckiernan
This worked great with one exception. For some reason the Heap Memory performance graph stopped updating. I don't care about decimals there so I switched that one back to the old check_jmx. The rest of my 45 JMX checks are working fine.
Thanks for your help.
Chris
Re: check_jmx Decimal Places
Posted: Thu Apr 20, 2017 9:54 am
by cdienger
Thanks for the update. Are we good to lock this one up then or did you have any additional questions?
Re: check_jmx Decimal Places
Posted: Thu Apr 20, 2017 12:56 pm
by ckiernan
I'm good. Please close.