Illegal character $

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
claudio.nunes
Posts: 7
Joined: Mon Jul 11, 2011 1:44 am
Location: Mozambique

Illegal character $

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Illegal character $

Post by mguthrie »

If I remember correctly you can escape the $ sign with another $ sign.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Illegal character $

Post 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.
Nicholas Scott
Former Nagios employee
claudio.nunes
Posts: 7
Joined: Mon Jul 11, 2011 1:44 am
Location: Mozambique

Re: Illegal character $

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Illegal character $

Post 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
claudio.nunes
Posts: 7
Joined: Mon Jul 11, 2011 1:44 am
Location: Mozambique

Re: Illegal character $

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Illegal character $

Post 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.
claudio.nunes
Posts: 7
Joined: Mon Jul 11, 2011 1:44 am
Location: Mozambique

Re: Illegal character $

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Illegal character $

Post by lmiltchev »

Does this command work if you try running a check on another service, that does NOT contain the "illegal character $"?
Be sure to check out our Knowledgebase for helpful articles and solutions!
claudio.nunes
Posts: 7
Joined: Mon Jul 11, 2011 1:44 am
Location: Mozambique

Re: Illegal character $

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