I created my own nagios command
$USER1$/check_http -H $HOSTNAME$ -p $ARG1$ -u $ARG2$ -e $ARG3$ -w 5 -c 10 -4
used by a new service.
When the $ARG3$
contains some white space (for instance "200 OK") the service fail reporting "name or service not known". As in the following command line:
check_http -H 1.1.1.1 -u /xxx/1234.pdf -w 5 -c 10 -e 200 OK
Name or service not known
How can I quote the white space in some way?
Best Answer
On the command line, just quote it
In the NAGIOS config file, merely separating it from
$ARG2$
with a!
should be enough to protect it; in my experience, NAGIOS will generally protect spaces. If that doesn't work, quote it in$ARG3$
also.