Hey everyone.
I'am trying to setup some JMX monitors, but can't get it to work. The check is working fine but the value is a long string and not just value. So my question is how do I search for a specific word and value in the long string?
check_jmx -a '-U service:jmx:rmi:///jndi/rmi://192.168.197.25:8099/jmxrmi -O "STEP Monitoring:name=connectionStatuses" -A ConnectionStatuses -onlyvalue'
JMX OK - ConnectionStatuses={DB.connection=1, HST.connection=1, HST.keepalive=0, net.10.220.4.31-connection=0, net.10.220.4.31-keepalive=228, net.10.220.4.32-connection=0, net.10.220.4.32-keepalive=2, net.10.220.4.33-connection=0, net.10.220.4.33-keepalive=29, net.10.220.4.34-connection=0, net.10.220.4.34-keepalive=29, net.10.220.4.35-connection=0, net.10.220.4.35-keepalive=4, net.10.220.4.36-connection=0, net.10.220.4.36-keepalive=206, eros.10.220.5.34-connection=0, eros.10.220.5.34-keepalive=5, eros.10.220.5.35-connection=0, eros.10.220.5.35-keepalive=1, eros.10.220.5.36-connection=0, eros.10.220.5.36-keepalive=0, eros.10.220.5.37-connection=0, eros.10.220.5.37-keepalive=0}
I want to setup a monitor that alerts me if eros.10.220.5.34-keepalive=5 is greater than 300, i have tried -vvvv -w xx -c xx but that did not work.
Thanks in advance
Need help with CHECK_JMX value
Re: Need help with CHECK_JMX value
If you don't mind my asking, what sort of application/server are you trying to monitor via JMX?
Which check_jmx are you using? Is it the one from these docs:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
If so, you might try leveraging the -K argument to pull a specific key's value out from the result set. Try this and share the output if it fails:
Which check_jmx are you using? Is it the one from these docs:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
If so, you might try leveraging the -K argument to pull a specific key's value out from the result set. Try this and share the output if it fails:
Code: Select all
check_jmx -a '-U service:jmx:rmi:///jndi/rmi://192.168.197.25:8099/jmxrmi -O "STEP Monitoring:name=connectionStatuses" -A ConnectionStatuses -K eros.10.220.5.34-keepalive -w 200 -c 300'
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Need help with CHECK_JMX value
Thanks for the assist, @mcapra! OP, let us know if you need further assistance.
Former Nagios employee
Re: Need help with CHECK_JMX value
Hey mcapra.
I have tried that solution with no luck.
I get this when I run the command.
JMX CRITICAL - 300is not of type Number,String or Boolean.
I'am trying to monitor a old self-developed solution here at work (not something that I have been involved in). The system handles signals from different systems and runs Activemq & Tomcat.
I have tried that solution with no luck.
I get this when I run the command.
JMX CRITICAL - 300is not of type Number,String or Boolean.
I'am trying to monitor a old self-developed solution here at work (not something that I have been involved in). The system handles signals from different systems and runs Activemq & Tomcat.
Re: Need help with CHECK_JMX value
Hmm, assuming you are using the aforementioned version of check_jmx, that error indicates bad inputs for the warning/critical args:
https://github.com/WillPlatnick/jmxquer ... #L215-L231
Very strange. Can you share the full output of the following commands executed from the CLI of your Nagios XI machine:
Could you also attach copies of your check_jmx and jmxquery.jar? They might be useful to have for comparison.
https://github.com/WillPlatnick/jmxquer ... #L215-L231
Very strange. Can you share the full output of the following commands executed from the CLI of your Nagios XI machine:
Code: Select all
/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.197.25:8099/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192
/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.197.25:8099/jmxrmi -O "STEP Monitoring:name=connectionStatuses" -A ConnectionStatuses -K eros.10.220.5.34-keepalive -vvvv -w 200 -c 300
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Need help with CHECK_JMX value
Thanks @mcapra!
OP, I fully agree with mcapra, but as I see you are new to the forums, I just want to note that you will need to set up a command in XI to go with this check. It looks like you can skip the first bit of https://assets.nagios.com/downloads/nag ... ios-XI.pdf, but the rest should be useful.
OP, I fully agree with mcapra, but as I see you are new to the forums, I just want to note that you will need to set up a command in XI to go with this check. It looks like you can skip the first bit of https://assets.nagios.com/downloads/nag ... ios-XI.pdf, but the rest should be useful.