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
check_jmx Decimal Places
Re: check_jmx Decimal Places
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?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_jmx Decimal Places
./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
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
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.
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.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_jmx Decimal Places
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
Thanks for your help.
Chris
Re: check_jmx Decimal Places
Thanks for the update. Are we good to lock this one up then or did you have any additional questions?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_jmx Decimal Places
I'm good. Please close.