Page 1 of 1

Service argument containing an exclamation mark

Posted: Fri Feb 08, 2013 2:41 am
by chrisp
Hi,

I recently added a password to one of the argument fields on one of my services like so: -

Code: Select all

ARG1=pass!word
However, the password containing an exclamation mark (!) caused problems.

I was able to save the change to the service, but it didn't work as expected & upon investigation I re-edited the service and noted that the pass!word was now split across 2 argument fields like this: -

Code: Select all

ARG1=pass
ARG2=word
I've changed the password now, but thought it worthy of note...

Oddly, since adding these service checks (which still don't work as expected), the CCM seems very reluctant to show itself... Same goes for the Legacy CCM.

Right, I deleted all the new service checks with this issue, re-created one from the original (working) check & it still didn't work, so I changed the password again, so that it had no special characters.

This fixed the service check, so it seems like there's an issue with special characters in the CCM, because the same command syntax run from the CLI, works perfectly, but testing from the GUI or in normal use (Nagios scheduled checks), it borks.

This is an example similar to what I've got in this service: -

Code: Select all

$USER1$/check_http -I $HOSTADDRESS$ $ARG1$
ARG1=-H webmail.example.com -f follow -a '[email protected]:VTRBwbCA3'
So as well as the dodgy 5h0ck!horr0R password with exclamation mark issue noted above, passwords like DGexh$scv4 somehow get the system a bit upset and the checks fail.

Re: Service argument containing an exclamation mark

Posted: Fri Feb 08, 2013 10:15 am
by mguthrie
Yeah, the exclamation mark is actually a delimiter for service arguments, so I wouldn't recommend it for passwords if you can help it. The dollars signs will work, but you just need to escape them.
http://support.nagios.com/wiki/index.ph ... ck_Command

Re: Service argument containing an exclamation mark

Posted: Fri Feb 08, 2013 3:11 pm
by chrisp
Damn! I didn't even think about escaping the special characters...

Re: Service argument containing an exclamation mark

Posted: Mon Feb 11, 2013 11:27 am
by slansing
Closing thread and marking resolved. Thanks for letting us know what the issue was :).