Solution: Exclamation Point Workaround
Lori Adams
ladams at cloudmark.com
Sat Aug 6 01:29:17 CEST 2005
So I have tried both of these tests to no avail.
my password has an exclamation in it: pass!word I've tried escaping it.
I've put quotes around the $ARG$. I've done both things listed in this
thread.
Has anyone else had luck with arguments having an exclamation point?
-Lori
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Andreas
Ericsson
Sent: Sunday, June 19, 2005 2:09 PM
To: Brandon Knitter
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Solution: Exclamation Point Workaround
Brandon Knitter wrote:
> I'm not sure if this has been mentioned before, but I was having an
issue where
> my password to a database had a "!" in it. So the service had the
following:
>
> check_command check_database host!port!user!password!
>
> Where the password was "password!". Of course you can't do that cause
the
> exclamation is a separator and a reserved character. So I changed my
commmand
> from:
>
> command /path/to/check_database.sh $ARG1$ $ARG2$ $ARG3$ $ARG4$
>
> to the following:
>
> command printf "$ARG3$ $ARG4$" | xargs /path/to/check_database.sh
$ARG1$
> $ARG2$
>
A simpler solution is ofcourse to define the command as
check_database.sh '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$'
and the service as
check_command check_database!host!port!user!password\!
> and then in my object definition, I changed my check command to:
>
> check_command check_database host!port!user!password\x21
>
> The printf command will expand the "\x21" to a "!" when executing
things. It's
> a nice little workaround that I found and figured I'd share. :) Hope
this
> helps y'all.
>
> Cheers,
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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