Bad Characters in a cfg description. Nagios wont save.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
krw
Posts: 71
Joined: Tue May 29, 2012 2:01 pm

Bad Characters in a cfg description. Nagios wont save.

Post by krw »

So more testing and getting to know Nagios I decided to add a switch to monitor. Its an old Cisco 2950.
SNMP is enabled.

Went through the discovery process, found which switch ports were up and all have descriptions. Hmm,
good stuff. Hit apply to save config and nagios errors out:

Error: The description string for service '<< CMTS-1 >> Status' on host 'my.host.name' contains one or more illegal characters.
Error: The description string for service '<< City1 - City2 >> Bandwidth' on host 'my.host.name' contains one or more illegal characters.

Hmm, ok < characters might be a problem. Its only a few ports so I'll go in and put a new description on
the ports.

Run through the discovery again, looks good, no << characters anywhere, hit apply and nagios errors again on the same
thing.

So now it appears nagios has stored somewhere the bad config from the first time I tried this and now will not
write any updated configs because of that. The FAQ does not appear to have anything about this problem.
What file(s) do I need to delete on the server to fix this?

Thanks.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bad Characters in a cfg description. Nagios wont save.

Post by lmiltchev »

Nagios cannot start or restart with bad configuration. I would suggest running the Write Config Tool, in order to verify your configuration, find out if there are any errors, fix them, and then apply configuration. To learn more about using the Write Config Tool, you can read this document:

http://assets.nagios.com/downloads/nagi ... tabase.pdf

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
krw
Posts: 71
Joined: Tue May 29, 2012 2:01 pm

Re: Bad Characters in a cfg description. Nagios wont save.

Post by krw »

I can see the errors and know what they are and what .cfg file they are coming from.

I delete the offending .cfg file, but it gets re-created from bad information sitting somewhere
from when I ran the monitoring wizard over a switch. I told the monitoring wizard to use the
port descriptions which had << >> in the descriptions. When I went to save/apply the config
nagios did not like the << >> characters.

nagios created the .cfg file, but when I delete the config file, it gets recreated when I try
to save/apply again. So the data from that monitoring wizard is still kicking around somewhere
and I don't know where. Consequently I can not make any changes at the moment.

Is there something stuck in a database I need to get rid of?

EDIT: So yea, I figured it out.

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Bad Characters in a cfg description. Nagios wont save.

Post by scottwilkerson »

Glad you figured it out.

For completeness, the item would need to be removed from the CCM or it will be rewritten next time the configuration is applied.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked