Page 1 of 1

"JMX CRITICAL - objectName not found" GarbageCollector

Posted: Fri Jan 29, 2021 2:18 am
by sacom01
hi team,
i need monitor the GarbageCollector using check_jmx but it return "objectName not found"
This plugin work fine with check connection pool, cpu.

[root@nagiosxi libexec]#/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.xxx.xx:9000/jmxrmi -O java.lang:type=GarbageCollector,name=ConcurrentMarkSweep" -A LastGcInfo -K duration -u ms -vvvv -w 10 -c 20
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=ConcurrentMarkSweep]

Pls help me correct it.
Thanks

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Fri Jan 29, 2021 4:26 pm
by ssax
I had to add this to my startup for the JAVA_OPTIONS on the remote server and restart the services to get it to work:

Code: Select all

-XX:+UseConcMarkSweepGC
You didn't specify what product you're checking but I did it on weblogic and had to change it in this file:
- You will need to reach out to your java app server admins in order to determine where that's required on your systems

Code: Select all

/u01/app/oracle/config/domains/TEST/bin/startWebLogic.sh
Then I restarted the java app server and it worked.

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Sun Jan 31, 2021 9:48 pm
by sacom01
hi ssax,
i was updated "-XX:+UseConcMarkSweepGC" to JAVA_OPTION and restart the JVM but getting same error.
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=ConcurrentMarkSweep]

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Mon Feb 01, 2021 10:44 am
by SteveBeauchemin
Sometimes the names are not what you expect.

I get past this by listing all the possible mbeans to a file which I can look through to find the proper names.

Try this syntax

Code: Select all

jmx4perl http://localhost:8080/jolokia \
--target service:jmx:rmi:///jndi/rmi://[IP of system]:[JMX port]/jmxrmi \
--target-user [JMX username] \
--target-password [JMX password] \
list > /tmp/jmxdump.txt
Then examine the /tmp/jmxdump.txt and look for the syntax: GarbageCollector
Verify that the name is as expected. There can be more than one name for that collector.

The dump also provides other application specific data that you may want to explore. I have found in the data interesting items such as connection counts and other nice metrics that the application owners like.

Steve B

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Mon Feb 01, 2021 6:11 pm
by ssax
Thanks for posting that @SteveBeauchemin, we really do not know much about java/jmx here and that is very helpful!

@sacom01, you will likely need to reach out to your java app server admins or your java app server support team in order to determine where it needs to be setup.

What java app server software are you running? (weblogic/websphere/wildfly/etc)

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Thu Feb 25, 2021 4:37 am
by sacom01
hi ssax,
i found it from run 'jconsole 192.168.117.1:9000" on shell and find.
pls close this ticket.
thank you.

Re: "JMX CRITICAL - objectName not found" GarbageCollector

Posted: Thu Feb 25, 2021 9:16 am
by scottwilkerson
sacom01 wrote:hi ssax,
i found it from run 'jconsole 192.168.117.1:9000" on shell and find.
pls close this ticket.
thank you.
Locking thread