Page 1 of 1

Errors while executing plugin check_jmx

Posted: Wed May 23, 2018 2:15 am
by nai70966
Hello,

I need to monitor java heap memory on one of the Linux server, so I Installed NRPE and the plugin check_jmx (https://assets.nagios.com/downloads/nag ... 1520310510) along with the jmxquery.jar file.
But, after executing the below command there is a Java error that appears.

[nagios@hostname libexec]$ ./check_jmx -U service:jmx:rmi:///jndi/rmi://hostname:9000/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192

Attached is the error which is thrown out after executing the above command.

Also we are using the ports 9000 and 7001, but both of these gives the same error. I tried to replace ///jndi/rmi://hostname:9000/ with //jndi/rmi://localhost:9000/ and ///jndi/rmi://127.0.0.1:9000/, but no luck.

We also tried to specify the JAVA_HOME in the .bash_profile, But that doesn't work.

Could you please help us with this.
JAVA_Plugin_Error.txt


Thanks,
Sayali

Re: Errors while executing plugin check_jmx

Posted: Wed May 23, 2018 11:39 am
by mcapra
Did you follow any specific documentation when configuring the Java application to accept JMX connections? Can you share how JMX was configured within the remote application?

It's worth mentioning check_jmx will not work with Jolokia or other popular third-party JMX "agents". It was built specifically for vanilla JMX connections.

Re: Errors while executing plugin check_jmx

Posted: Wed May 23, 2018 1:47 pm
by cdienger
Thanks for the assist, @mcapra. @nai70966 let us know if this has helped.