Can't use bang (!) as string in services.cfg check_command declaration

Lennard Bakker bakkerl at lamp.xs4all.nl
Mon Apr 21 21:47:39 CEST 2003


On Mon, 2003-04-21 at 15:51, Jason Lancaster wrote:
> I seriously apologize if this went through the first time I sent this. I
> received a "returned mail" message saying it didn't...
> 
> In my service definition file, I need to define a check_command that looks
> something like this:
> 
> 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. I don't want
> the above line to be split into multiple arguments. It should be a single
> argument passed to the check command check_http.

Is it possible to create a user macro in the resource file?
Something like 
$USER2$=!ab2!)z!

And would the check command be something like:
check_command check_http!-S -u /post.html -P
username=abc&password=$USER2$ -s status

I don't know for sure if this will work, but you can give it a try.

More information about macro's can be found in de nagios help.

Lennard Bakker







-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list