I've tried everything possible.<br>I am completely lost.<br>I want to throw my keyboard through a window.<br>How in god's name do I get nagios to accept an argument that includes spaces?<br><br>I have a service that uses the check_by_ssh plugin to run a script on a remote server. The script takes an argument that is wrapped in quotes and can potentially contain spaces. <br>
<br><br>Originally I had defined the command as <br><br>comand_name        check_by_ssh<br>command_line        /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ --command=$ARG1$<br><br>which works fine for a service that looks like this...<br>
<br>check_by_ssh!"/usr/lib/nagios/plugins/check_load -w 5,5,5 -c 9,9,9"<br><br>but not for one that looks like this...<br><br>check_by_ssh!"/my/custom/script '$ARG1$'"<br><br>So I defined a new command...<br>
<br>command_name        my_custom_script<br>command_line           /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS --command="/my/custom/script '$ARG1$'"<br><br>and set up a new service...<br><br>my_custom_script!"this is my argument"<br>
<br>and that still fails. Wy are my quotes/spaces not being passed? What is going on here? I have tried every combination of single quotes, double quotes, escaping quotes, escaping spaces, and invoking the will of satan but I can not get this thing to work. For the love of god help me.<br>
<br><br>