Page 1 of 1
Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 9:20 am
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.
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 9:43 am
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..
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 9:56 am
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.
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 10:05 am
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.
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 10:35 am
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.
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 11:03 am
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
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 11:07 am
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?
Re: Nagios XI Config will Not Apply
Posted: Tue Oct 23, 2012 11:09 am
by the_real__beaver
posted too fast, thanks for the fix... configuration applied. cheers.