Page 1 of 1

check_jmx error Invalid credentials

Posted: Tue Aug 21, 2012 4:18 pm
by westernuniv
Hi,
I have downloaded check_jmx nagios plugin from Nagios Exchange and followed readme.txt for installation
http://exchange.nagios.org/directory/Pl ... mx/details
When I tried to execute check_jmx I've got the following message.
# ./check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used
JMX CRITICAL Invalid credentials specified for administrative user

Where I need to configure credentials?

Thanks

Re: check_jmx error Invalid credentials

Posted: Wed Aug 22, 2012 10:16 am
by slansing
hello Westernuniv,

As Swilkerson says belowIt seems as though the check_jmx plugin does not have the ability to add credentials you could try this:

-username

monitorRole jmx username

-password

monitorRole jmx password

Are the values you are looking for, example:

Code: Select all

/usr/lib/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 731847066 -c 1045495808 -username monitorRole -password password
This was found here:

http://code.google.com/p/jmxquery/wiki/Usage

There are a few variations of check_jmx hope this helps.

Re: check_jmx error Invalid credentials

Posted: Wed Aug 22, 2012 10:34 am
by scottwilkerson
I'm not really familiar with this plugin or JMX but I did download it and look at the help file and it doesn't look like it has the ability to change credentials.

However, looking at this document
http://docs.oracle.com/javase/1.5.0/doc ... ccessFiles
it looks like you can set the credentials in a file

Re: check_jmx error Invalid credentials

Posted: Wed Aug 22, 2012 2:54 pm
by westernuniv
I did a search from google and got suggestions to add following JVM options to glassfish server to disable password authentication, it didn’t help.
-Djava.rmi.server.hostname=<hostname>
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false

Then I downloaded the one suggested by slansing and used glassfish admin credentials, it worked.
Thanks guys!

Re: check_jmx error Invalid credentials

Posted: Wed Aug 22, 2012 3:12 pm
by slansing
Excellent, glad it worked out.