@jh129666, Sigle quotes are not allowed in NRPE. You may try to enable "nasty characters". On the remote server open nrpe.cfg and enable the following arguments:
Code: Select all
allow nasty characters=true
allow nasty characters=true
When that's done restart NRPE and try passing the command with single and double quotes one more time. But if that doesn't work I recommend hardcoding the base part of the command in nrpe.cfg and only passing the argument that is actually changing. Just like so:
Code: Select all
command[check_jmx]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://$ARG1$:1234/jmxrmi -O org.apache.camel:context=camel-1,type=components,name='"activemq"' -A State
Or
Code: Select all
command[check_jmx]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://$ARG1$/jmxrmi -O org.apache.camel:context=camel-1,type=components,name='"activemq"' -A State
The only condition is that
name='"activemq"' stays defined in nrpe.cfg