Complex nagios command
- by gonvaled
I have defined the following command for one of my service checks:
define command{
command_name mycommand
command_line $USER1$/check_by_ssh -p $ARG1$ -l nagios -i /etc/nagios2/keys/key1 -H $HOSTADDRESS$ -v -C 'source $USER10$ ; command.py -a get --alert-name $ARG2$ -q'
}
The problem is that it seems that nagios is parsing the command with the semicolon, and producing garbage which can not be executed. I have tried also putting a backslash \;, to no avail.
If I run the command directly on the shell, it works. Which means that this is not a problem with check_by_ssh, but a problem on the parsing of the nagios configuration file.
How can I debug this? Is there a way to get a listing of all the commands that nagios has parsed when reading the configuration files?