Nagios XI Config will Not Apply

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
the_real__beaver
Posts: 5
Joined: Tue Oct 23, 2012 9:14 am

Nagios XI Config will Not Apply

Post by the_real__beaver »

nagios techs,

when i attempt to apply the config through the XI interface, i get an error. it says that a contact is a duplicate. but it doesnt appear anywhere else that i can find. this is a very visible demo that i need to get back onside for a Proof of Concept.

can you help?

beaver.
JulianFDRacing
Posts: 51
Joined: Tue Oct 16, 2012 9:45 am

Re: Nagios XI Config will Not Apply

Post by JulianFDRacing »

In CCM under contacts what happens when you click the "i" info button at the end of the contact detail? This should tell you everywhere a contact is used? May help you troubleshoot the issue..
the_real__beaver
Posts: 5
Joined: Tue Oct 23, 2012 9:14 am

Re: Nagios XI Config will Not Apply

Post by the_real__beaver »

not really.

this is the error that i get

Warning: Duplicate definition found for contact 'xi_default_contact' (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 79)
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 80.
Error processing object config files!

there is no 'xi_default_contact' in that cfg file.

further to that, i cant roll back the config
further still, it works and checks out in core and command line.
the_real__beaver
Posts: 5
Joined: Tue Oct 23, 2012 9:14 am

Re: Nagios XI Config will Not Apply

Post by the_real__beaver »

Is there any way to delete the NagiosQL database entirely and have it rebuilt by the config files? I really dont have the luxury of having this offline. I would simply rebuiled the server but i need the metrics we have gathered thus far.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Config will Not Apply

Post by lmiltchev »

You probably imported the config files from the "static" directory into Nagios XI. Now you have the "xi_default_contact" in the static directory AND in the database as well, so you are not able to apply configuration.
Be sure to check out our Knowledgebase for helpful articles and solutions!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Config will Not Apply

Post by scottwilkerson »

You can resolve this by running the following command and then Applying configuration

Code: Select all

curl -s http://assets.nagios.com/downloads/nagiosxi/scripts/fix_static_import| mysql -pnagiosxi nagiosql
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
the_real__beaver
Posts: 5
Joined: Tue Oct 23, 2012 9:14 am

Re: Nagios XI Config will Not Apply

Post by the_real__beaver »

that was only after it errored out to begin with with that message. how can i wipe the db? whats the fix here?
the_real__beaver
Posts: 5
Joined: Tue Oct 23, 2012 9:14 am

Re: Nagios XI Config will Not Apply

Post by the_real__beaver »

posted too fast, thanks for the fix... configuration applied. cheers.
Locked