Duplicate entry errors after removing static files

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ray-fc
Posts: 1
Joined: Mon Oct 19, 2015 10:30 am

Duplicate entry errors after removing static files

Post by ray-fc »

I've migrated from some static files that I was using during initial setup to hosts entered through autodiscovery. I've deleted the static files, but now all hosts that were in a static file is now 'inactive'. When I try to set one to 'active' I get a message like the one below:


Error: Could not add object property in file '/usr/local/nagios/etc/hosts/ads201.dc.farecompare.com.cfg' on line 17.

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'ads201.dc.farecompare.com' (config file '/usr/local/nagios/etc/hosts/ads201.dc.farecompare.com.cfg', starting on line 16)
Error: Could not add object property in file '/usr/local/nagios/etc/hosts/ads201.dc.farecompare.com.cfg' on line 17.
Error processing object config files!
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Duplicate entry errors after removing static files

Post by Box293 »

Can you follow these steps please:

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button

Do you get errors?

If you do, can you post the file /usr/local/nagios/etc/hosts/ads201.dc.farecompare.com.cfg
It doesn't exist in the profile you sent, because there was an error during Apply nagios reverts back to the previous configs, hence the steps above are required.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked