when passing args remotely do you need to escape the arguments leading ! character?
Code: Select all
define service{
use generic-service
host_name alphprdfuse1i
service_description Container PassThru Broker Health
check_command check_nrpe!check_remote_container_broker_health!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical !Good''
}
[1562954067] Running command: /usr/local/nagios/libexec/check_jmx4perl --user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical Good
[1562954068] Command completed with return code 2 and output: CRITICAL - [org.apache.activemq:type=Broker,brokerName=amq,service=Health,CurrentStatus] : 'Good' matches threshold 'Good'
[1562954068] Return Code: 2, Output: CRITICAL - [org.apache.activemq:type=Broker,brokerName=amq,service=Health,CurrentStatus] : 'Good' matches threshold 'Good'
[1562954068] Connection from 3.239.245.209 closed.
I tried escaping with \ char but doesn't work.
Code: Select all
define service{
use generic-service
host_name alphprdfuse1i
service_description Container PassThru Broker Health
check_command check_nrpe!check_remote_container_broker_health!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical \!Good''
}
[1562954667] Command completed with return code 2 and output: CRITICAL - [org.apache.activemq:type=Broker,brokerName=amq,service=Health,CurrentStatus] : 'Good' matches threshold 'Good'
[1562954667] Return Code: 2, Output: CRITICAL - [org.apache.activemq:type=Broker,brokerName=amq,service=Health,CurrentStatus] : 'Good' matches threshold 'Good'
[1562954667] Connection from 3.239.245.209 closed.