how to get exact objectname for jmx monitor
how to get exact objectname for jmx monitor
hi,
i found some parameters for monitoring jvm but when run jmx_check it getting error "objectName not found".
How to check exact the object name? I tried found in jConsole for check but same error.
one guy name SteveB told we can use jmx4perl but dont know how to run.
[root@dc-nagiosxi-uat01 ~]# jmx4perl http://localhost:8080/jolokia \
> --target service:jmx:rmi:///jndi/rmi://[192.168.117.1]:[9002]/jmxrmi \
> --target-user [xxxx] \
> --target-password [xxxxx] \
> list > /tmp/jmxdump.txt
-bash: jmx4perl: command not found
i found some parameters for monitoring jvm but when run jmx_check it getting error "objectName not found".
How to check exact the object name? I tried found in jConsole for check but same error.
one guy name SteveB told we can use jmx4perl but dont know how to run.
[root@dc-nagiosxi-uat01 ~]# jmx4perl http://localhost:8080/jolokia \
> --target service:jmx:rmi:///jndi/rmi://[192.168.117.1]:[9002]/jmxrmi \
> --target-user [xxxx] \
> --target-password [xxxxx] \
> list > /tmp/jmxdump.txt
-bash: jmx4perl: command not found
You do not have the required permissions to view the files attached to this post.
Re: how to get exact objectname for jmx monitor
Hi sacom01,
It looks like either jmx4perl isn't installed on your system or it's not in your search path:
https://metacpan.org/dist/jmx4perl/view ... s/jmx4perl
Beyond that there may be others here who can help you with the specifics of JMX - it's a little outside my experience set : ).
Thanks and Best Regards,
Keith
It looks like either jmx4perl isn't installed on your system or it's not in your search path:
If it's not installed on your system it looks like it is available on CPAN:-bash: jmx4perl: command not found
https://metacpan.org/dist/jmx4perl/view ... s/jmx4perl
Beyond that there may be others here who can help you with the specifics of JMX - it's a little outside my experience set : ).
Thanks and Best Regards,
Keith
Re: how to get exact objectname for jmx monitor
hi,
if dont use jmx4perl, how to determine object name?
if dont use jmx4perl, how to determine object name?
Re: how to get exact objectname for jmx monitor
Hi,
If you have the java jdk installed on your laptop/desktop there should be an application
in C:\Program Files\Java\jdk-16\bin called jconsole.exe that you can use to connect to the
machine that is running the jvm that you want to monitor.
Thanks
If you have the java jdk installed on your laptop/desktop there should be an application
in C:\Program Files\Java\jdk-16\bin called jconsole.exe that you can use to connect to the
machine that is running the jvm that you want to monitor.
Thanks
Re: how to get exact objectname for jmx monitor
hi,
os is Redhat7.
As i told, i used jconsole for find Objectname but unable to run jmx check.
[root@dc-nagiosxi-uat01 ~]# /usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=GarbageCollector,name=PS MarkSweep" -A "CollectionCount" -u MB -w 100 -c 200 --username xxxx --password xxxxx
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=PS MarkSweep]
os is Redhat7.
As i told, i used jconsole for find Objectname but unable to run jmx check.
[root@dc-nagiosxi-uat01 ~]# /usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=GarbageCollector,name=PS MarkSweep" -A "CollectionCount" -u MB -w 100 -c 200 --username xxxx --password xxxxx
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=PS MarkSweep]
You do not have the required permissions to view the files attached to this post.
Re: how to get exact objectname for jmx monitor
Hi,
The problem is with the plugin, it doesn't like spaces like the one in "PS MarkSweep"
Remove the check_jmx and jmxquery.jar files from /usr/local/nagios/libexec and replace them
with the ones found in the plugin of
https://github.com/WillPlatnick/jmxquery
My results using original plugin files:
now with plugin files referenced above:
Thanks
The problem is with the plugin, it doesn't like spaces like the one in "PS MarkSweep"
Remove the check_jmx and jmxquery.jar files from /usr/local/nagios/libexec and replace them
with the ones found in the plugin of
https://github.com/WillPlatnick/jmxquery
My results using original plugin files:
Code: Select all
[root@localhost libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.254.63:9010/jmxrmi -O java.lang:name="G1 Old Generation",type=GarbageCollector -A CollectionCount -w 10 -c 20
JMX CRITICAL java.lang:name=G1Code: Select all
[root@localhost libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.254.63:9010/jmxrmi -O java.lang:name="G1 Old Generation",type=GarbageCollector -A CollectionCount -w 10 -c 20
JMX OK - CollectionCount=0 | CollectionCount=0Thanks
Re: how to get exact objectname for jmx monitor
hi,
after replace 2 files check_jmx and jmxquery.jar, it was getting Authentication failed instead i provide username and pw:
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O java.lang:name="Tenured Gen",type=MemoryPool -A "Usage.committed" -w 100 -c 200 --username xxxx--password xxxx
JMX CRITICAL - Authentication failed! Credentials required
i found different from old check_jmx and the new one :
The old one :
[root@dc-nagiosxi-uat01 libexec]# more check_jmx.bk/check_jmx
#!/bin/sh
#
# Nagios JMX plugin.
#
#JAVA_CMD=`which java`
JAVA_CMD='/home/nagios/jdk1.8.0_181/bin/java'
if [ -z $JAVA_CMD ]
then
if [ -x $JAVA_HOME/bin/java ]
then
JAVA_CMD=$JAVA_HOME/bin/java
else
echo JMX CRITICAL - java not found.
exit 2
fi
fi
DIR=`dirname $0`
$JAVA_CMD -jar $DIR/check_jmx.jar "$@"
The new one :
[root@dc-nagiosxi-uat01 libexec]# more check_jmx
#!/bin/sh
#
# Nagios plugin to monitor Java JMX (http://java.sun.com/jmx)attributes.
#
RDIR=`dirname $0`
java -jar $RDIR/jmxquery.jar "$@"
how to make it understand the authentication?
after replace 2 files check_jmx and jmxquery.jar, it was getting Authentication failed instead i provide username and pw:
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O java.lang:name="Tenured Gen",type=MemoryPool -A "Usage.committed" -w 100 -c 200 --username xxxx--password xxxx
JMX CRITICAL - Authentication failed! Credentials required
i found different from old check_jmx and the new one :
The old one :
[root@dc-nagiosxi-uat01 libexec]# more check_jmx.bk/check_jmx
#!/bin/sh
#
# Nagios JMX plugin.
#
#JAVA_CMD=`which java`
JAVA_CMD='/home/nagios/jdk1.8.0_181/bin/java'
if [ -z $JAVA_CMD ]
then
if [ -x $JAVA_HOME/bin/java ]
then
JAVA_CMD=$JAVA_HOME/bin/java
else
echo JMX CRITICAL - java not found.
exit 2
fi
fi
DIR=`dirname $0`
$JAVA_CMD -jar $DIR/check_jmx.jar "$@"
The new one :
[root@dc-nagiosxi-uat01 libexec]# more check_jmx
#!/bin/sh
#
# Nagios plugin to monitor Java JMX (http://java.sun.com/jmx)attributes.
#
RDIR=`dirname $0`
java -jar $RDIR/jmxquery.jar "$@"
how to make it understand the authentication?
Re: how to get exact objectname for jmx monitor
Hi
What are the arguments used to launch the jvm you are trying to monitor?
Thx
What are the arguments used to launch the jvm you are trying to monitor?
Thx
Re: how to get exact objectname for jmx monitor
hi,
-Djavax.management.builder.initial=
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=ho_xxxx_06
-Dcom.sun.management.jmxremote.port=9002
when i use the old check_jmx and jmxquery.jar, it's work fine.
-Djavax.management.builder.initial=
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=ho_xxxx_06
-Dcom.sun.management.jmxremote.port=9002
when i use the old check_jmx and jmxquery.jar, it's work fine.
Re: how to get exact objectname for jmx monitor
hi bro,
any update to us?
thank you
any update to us?
thank you