using nrpe to monitor jmx
Posted: Mon Feb 10, 2020 1:05 pm
i am currently trying to monitor jmx using nrpe and it works on my jmx server but doesnt work on the remote nagios server, this only happens when the command has a special character in, please see successful command ran on jx server and unsuccessful command on remote nagios xi server
jmx server: lxatmsd1 libexec]$ ./check_jmx -U service:jmx:rmi:///jndi/rmi://lxatmsd1:9077/jmxrmi -O com.bea:ServerRuntime=tmsServer1,Name=TMS'!'TMSJMSServer1@IE_TO_TMS_QUEUE,Type=JMSDestinationRuntime,JMSServerRuntime=TMSJMSServer1 -A ConsumersTotalCount -K used -I ConsumersTotalCount -J used -vvvv -w 5 -c 10
JMX WARNING - ConsumersTotalCount.used=16 | ConsumersTotalCount.used=1616
nagiosxiserver: ./check_nrpe -H lxatmsd1 -c -n check_jmx -a '-U service:jmx:rmi:///jndi/rmi://lxatmsd1:9077/jmxrmi -O com.bea:ServerRuntime=tmsServer1,Name=TMS\!TMSJMSServer1@IE_T O_TMS_QUEUE,Type=JMSDestinationRuntime,JMSServerRuntime=TMSJMSServer1 -A ConsumersTotalCount -K used -I ConsumersTotalCount -J used -vvvv -w 5 -c 10'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
i have tried other options like putting double quotes or a slash infront of the special characters but it still dosent work, please your help will be appriciated
jmx server: lxatmsd1 libexec]$ ./check_jmx -U service:jmx:rmi:///jndi/rmi://lxatmsd1:9077/jmxrmi -O com.bea:ServerRuntime=tmsServer1,Name=TMS'!'TMSJMSServer1@IE_TO_TMS_QUEUE,Type=JMSDestinationRuntime,JMSServerRuntime=TMSJMSServer1 -A ConsumersTotalCount -K used -I ConsumersTotalCount -J used -vvvv -w 5 -c 10
JMX WARNING - ConsumersTotalCount.used=16 | ConsumersTotalCount.used=1616
nagiosxiserver: ./check_nrpe -H lxatmsd1 -c -n check_jmx -a '-U service:jmx:rmi:///jndi/rmi://lxatmsd1:9077/jmxrmi -O com.bea:ServerRuntime=tmsServer1,Name=TMS\!TMSJMSServer1@IE_T O_TMS_QUEUE,Type=JMSDestinationRuntime,JMSServerRuntime=TMSJMSServer1 -A ConsumersTotalCount -K used -I ConsumersTotalCount -J used -vvvv -w 5 -c 10'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
i have tried other options like putting double quotes or a slash infront of the special characters but it still dosent work, please your help will be appriciated