Page 1 of 2

Illegal character $

Posted: Mon Jul 11, 2011 1:59 am
by claudio.nunes
Morning

I´m having problems with Nagios,

I have to monitor a pair of services wich has the dollar ($) character and I´m having this error:

"Error: The description string for service '"MSSQL$ITEMS"' on host 'myserver.mydomain.mz' contains one or more illegal characters"


HELP PLEASE :(

Regards Cláudio

Re: Illegal character $

Posted: Mon Jul 11, 2011 12:41 pm
by mguthrie
If I remember correctly you can escape the $ sign with another $ sign.

Re: Illegal character $

Posted: Mon Jul 11, 2011 12:45 pm
by nscott
If you try mguthrie's solution and it doesn't work, give this a try:

You can set illegal characters in your nagios.cfg. (/usr/local/nagios/etc/nagios.cfg) If you crack that file open you will see that the $ is on the list of illegal characters. You can remove that from the list of illegal characters, but keep in mind that it is illegal for a reason and may have some unpredictable results.

Re: Illegal character $

Posted: Tue Jul 19, 2011 3:58 am
by claudio.nunes
i deleted the dollar ($) in nagios.cfg and also in core configuration manager(CCM).

But when a enter the host and respective services(wich contains the $) to be monitored, nagios still give me the same error :shock: (Error: The description string for service '"MSSQL$ITEMS"' on host 'myserver.mydomain.mz' contains one or more illegal characters").

And the $ is back both in nagios.cfg and CCM.

Any Help????

Regards

Cláudio Nunes

Re: Illegal character $

Posted: Tue Jul 19, 2011 3:26 pm
by mguthrie
Can you run a test from the command-line with the check you're trying to run, and show us both the command and the output? (minus private data)

This doc explains how to run a command-line test.
http://assets.nagios.com/downloads/nagi ... hp#plugins

Re: Illegal character $

Posted: Thu Jul 21, 2011 8:52 am
by claudio.nunes
Dear Mguthrie
@ the link you send i didnt find the explanation of a command-line test. :cry:

Let get back to ground zero shall we?

I´m using nagios to monitor my network...

I have 5 services containing the dollar symbol ($) wich accordingly to nagios is illegal.
Escaping it with $ (myservice$$control) or \ (myservice\$control), it doesnt work.

I went futher,
i delete the dollar symbol at nagios.cfg and Core Configure Manager(CCM),
i even deleted all hosts from the nagios database(nagiosql).

BUT, again when i introduce hosts and services(all my services contain $) nagios still give "Error: The description string for service '"myservice$control''' on host '[email protected]' contains one or more illegal characters"

so i´m still crying for help..

anyone please?????

regards

cláudio

Re: Illegal character $

Posted: Thu Jul 21, 2011 2:24 pm
by mguthrie
Sorry if that was unclear:
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
It's useful to be familiar with running your plugins from the
command line, for both informational and debugging purposes.
They are located the /usr/local/nagios/libexec directory. Navigate
to that directory and run your plugin with the following
commands:
# cd /usr/local/nagios/libexec
# ./plugin_name args...
Experiment a bit and figure out the best way to run the plugin. It
probably has a help option you can use to learn more:
# ./plugin_name -h
Here's an example:
# ./check_icmp -H localhost
OK - localhost: rta 0.016ms, lost 0%|rta=0.016ms;200.000;500.000;0; pl=0%;40;80;;
Page
What I need to see is the full test being run from the command-line. The argument string with the $ sign may need to be in single quotes or else the shell will try to interpret it.

Re: Illegal character $

Posted: Tue Aug 02, 2011 4:01 am
by claudio.nunes
Dear Mguthrie sorry for the late response,

i tested in command line

"./check_nt -h myserver -p 12489 -s secretpassword -t 5 SERVICESTATE -l MSSQL$ITEMS -d SHOWALL
check_nt could no parse arguments"

regards

Cláudio Nunes

Re: Illegal character $

Posted: Tue Aug 02, 2011 1:15 pm
by lmiltchev
Does this command work if you try running a check on another service, that does NOT contain the "illegal character $"?

Re: Illegal character $

Posted: Thu Aug 04, 2011 3:38 am
by claudio.nunes
Yes it does... i used the same command to check another service and it is working fine.

Best regards

cláudio nunes