View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Nagios : Service and Host Checks

Title:Cant pass bang (!) as string to plugin (i.e. check_http)
FAQ ID:F0157
Submitted By:Jason Lancaster 
Last Updated:05/15/2003

Description:

In your service definition file, you may need to execute a plugin (In this case check_http) pass bang (!) as string to plugin.

(eg:)

check_command check_http!-S -u /post.html -P username=abc&password=!ab2!z! -s status

The problem with this is the password has bang's (!) and Nagios translates these into arguments when it executes the check_http command.

 

Solution:

Since this is posting a url, you may use url encoding to pass the required character for this and replace ! with %21.

check_command check_http!-S -u /post.html -P username=abc&password=%21ab2%21z%21 -s status

http://www.ascii.cl/htmlcodes.htm has a nice list of any value you may need.

 

Keywords:bang check_http ! url encoding post arguments services.cfg