View FAQ

[ Return To FAQ Index | Search The FAQs ]

FAQ Database : Nagios : Service and Host Checks

Title:Post data not being received correctly
FAQ ID:F0324
Submitted By:Aaron 
Last Updated:03/14/2007

Description:I have a command of the form: $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -P $ARG3$ -s $ARG4$ The post data is not completely received, and I get a strange error "sh: line 1: -s: command not found" What is the problem? 

Solution:The command, with the parameters filled in, is passed onto the command line. If you are sending multiple name/value pairs, you are separating them with an ampersand (&). This is a reserved character that sends the command to the background. Escape the ampersand by adding a backslash in front of it. e.g. name1=value1&name2=var2 becomes name1=value1\&name2=var2 

Keywords:ampersand post check_http