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

Jason Lancaster jlancaster at affinity.com
Mon Apr 21 18:29:30 CEST 2003


In case anyone runs into a similar problem, a friend mentioned how I might
be able to use url encoding to pass the required character for this.

I ran over to http://www.ascii.cl/htmlcodes.htm and ! is 21, so a simple
change to the command to read:

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

WORKS! :)

Thanks for the input from everyone.

-Jason

----- Original Message -----
From: "Jason Lancaster" <jason at skynetweb.com>
To: <nagios-users at lists.sourceforge.net>
Sent: Monday, April 21, 2003 9:51
Subject: [Nagios-users] Can't use bang (!) as string in services.cfg
check_command declaration


> 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.
>
> There needs to be a way to designate text passed through service
definitions
> as a string or to somehow cancel out the !'s. I've tried backslashes,
double
> !'s, double quotes, single quotes, and everything else I could think of. I
> think nagios is hard-coded to see any ! in a object configuration file as
a
> special character. This is bad! Does anyone know a way around this other
> than defining a new check command for this service?
>
> Thanks!
> Jason Lancaster
>
>
>
> -------------------------------------------------------
> 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
>



-------------------------------------------------------
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