Page 2 of 2
Re: how to get exact objectname for jmx monitor
Posted: Tue Nov 30, 2021 1:55 pm
by kfanselow
Hi sacom01,
Try changing to a single hyphen and no equal sign for username and password ( -username <user name> -password <password> ):
Change "--username xxxx--password xxxx" to " -username xxxx -password yyyy "
If that fails you might want to try quoting your username and password strings to ensure any special characters might be interpreted by the shell.
For example: -password 'b@dpa$$'
Please let us know how that goes.
Thanks and Best Regards,
Keith
Re: how to get exact objectname for jmx monitor
Posted: Tue Nov 30, 2021 10:29 pm
by sacom01
hi,
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=OperatingSystem" -A "MaxFileDescriptorCount" -w 100 -c 200 -username nagiosxi -password UnixTeam
JMX CRITICAL - No such attribute : MaxFileDescriptorCount
Change "--username xxxx--password xxxx" to " -username xxxx -password yyyy " --> did not work.
If that fails you might want to try quoting your username and password strings to ensure any special characters might be interpreted by the shell.
For example: -password 'b@dpa$$' --> no special characters in my password, i tried and success with the old check_jmx and jmxquery.jar i told you.
Re: how to get exact objectname for jmx monitor
Posted: Wed Dec 01, 2021 11:57 am
by kfanselow
Hi sacom01,
Just wanted to follow up - were you able to successfully query the Garbage Collector object you were working on previously ?
Thanks and Best Regards,
Keith
Re: how to get exact objectname for jmx monitor
Posted: Wed Dec 01, 2021 10:13 pm
by sacom01
hi,
i tried query GC and the others but some of it was not success, as you told, jmx do not accept space in Object name but some objects do not contain space still not work. I just want ask how to determine exact objectname for jmx monitor as topic subject.
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=OperatingSystem" -A "MaxFileDescriptorCount" -w 100 -c 200 --username xxx --password xxx
JMX CRITICAL - attributeName not found [MaxFileDescriptorCount]
[root@dc-nagiosxi-uat01 libexec]#
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=OperatingSystem" -A "OpenFileDescriptorCount" -w 100 -c 200 --username xxx --password xxx
JMX CRITICAL - attributeName not found [OpenFileDescriptorCount]
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=OperatingSystem" -A "ProcessCpuLoad" -w 100 -c 200 --username xxx --password xxx
JMX CRITICAL - ProcessCpuLoad = -1.0 | 'ProcessCpuLoad'=-1.0;100;200;;
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=GarbageCollector,name=MarkSweepCompact" -A "CollectionCount" -w 100 -c 200 --username xxx --password xxx
JMX OK - CollectionCount = 3 | 'CollectionCount'=3;100;200;;
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=GarbageCollector,name=ParNew" -A "CollectionCount" -w 100 -c 200 --username xxx --password xxx
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=ParNew]
Re: how to get exact objectname for jmx monitor
Posted: Thu Dec 02, 2021 5:58 pm
by kfanselow
Hi sacom01,
We're going to have to look further into the space in the object name problem to understand what is going on.
Thanks and Best Regards,
Keith
Re: how to get exact objectname for jmx monitor
Posted: Thu Dec 02, 2021 8:48 pm
by sacom01
hi Keith,
as i sent you, some object names do not contain space but still not work.
example :
[root@dc-nagiosxi-uat01 libexec]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.117.1:9002/jmxrmi -O "java.lang:type=GarbageCollector,name=ParNew" -A "CollectionCount" -w 100 -c 200 --username xxx --password xxx
JMX CRITICAL - objectName not found [java.lang:type=GarbageCollector,name=ParNew]
thank you.
Re: how to get exact objectname for jmx monitor
Posted: Fri Dec 03, 2021 4:59 pm
by kfanselow
Hi sacom01,
Which version of the plugin are you using ? Are you using the original or are you using the updated version Greg recommended ? The updated version Greg recommended should handle spaces correctly -- it is derived from a version that contains the fix for the space issue.
https://code.google.com/archive/p/jmxquery/issues/16
Since we don't have access to your systems I think the best route at this point would be for you to work directly with the system's administrator if it is managed by someone else or open a ticket so we can get more information about it's configuration in confidence.
https://support.nagios.com/tickets/
Thanks and Best Regards,
Keith
Re: how to get exact objectname for jmx monitor
Posted: Mon Dec 06, 2021 3:34 am
by sacom01
hi Keith,
"Which version of the plugin are you using" --> don't know but i have attached jmx for your check.
"The updated version Greg recommended should handle spaces correctly -- it is derived from a version that contains the fix for the space issue." --> i already tried and reply in this topic about new jmx, pls read again the topic from begining.
Re: how to get exact objectname for jmx monitor
Posted: Mon Dec 06, 2021 5:16 pm
by kfanselow
Hi sacom01,
I see you submitted a ticket - Thank You. We will continue there and lock out this thread.
Thanks and best Regards,
Keith