Hi,
I have an issue where config files were imported into a new install of XI, the mysql databases were dropped and the tables and sequences in postress were dropped I then ran the installer scripts that delt with populating the databases but I still get the messages below about duplicate objects> How can I resolve these issues .
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Warning: Duplicate definition found for command 'check-host-alive' (config file '/usr/local/nagios/etc/commands.cfg', starting on line 14)
Error: Could not add object property in file '/usr/local/nagios/etc/commands.cfg' on line 15.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Regards
Dave
Duplicate entries in nagiosxi
Re: Duplicate entries in nagiosxi
You have two command files: /usr/local/nagios/etc/commands.cfg and /usr/local/nagios/etc/objects/commands.cfg. Basically it looks like you have both the NagiosQL and the original core nagios files being processed. You want one or the other, but not both as they contain many of the same directives.
Assuming that you want only the definitions from nagiosQL to be used do the following:
In Nagios XI go to core config manager > Advanced > Nagios Core Main Config. This will show you the contents of your Nagios.cfg file. Search through it and find the section marked "OBJECTS - UNMODIFIED" make sure the entires in here are commented out. Save the file and go to Tools > Write Config Files and click "Write Additional Data", then "Check configuration" then Restart Nagios.
That will tell Nagios to ignore the files in /usr/local/etc/object/ and only use the ones under /usr/local/nagios/etc. After this you may find issues with templates, contacts or timeperiods missing. Use the import config tool to import only those specific files from /usr/local/nagios/etc/objects and this should fix them.
Assuming that you want only the definitions from nagiosQL to be used do the following:
In Nagios XI go to core config manager > Advanced > Nagios Core Main Config. This will show you the contents of your Nagios.cfg file. Search through it and find the section marked "OBJECTS - UNMODIFIED" make sure the entires in here are commented out. Save the file and go to Tools > Write Config Files and click "Write Additional Data", then "Check configuration" then Restart Nagios.
That will tell Nagios to ignore the files in /usr/local/etc/object/ and only use the ones under /usr/local/nagios/etc. After this you may find issues with templates, contacts or timeperiods missing. Use the import config tool to import only those specific files from /usr/local/nagios/etc/objects and this should fix them.
Re: Duplicate entries in nagiosxi
We hadn't followed up on this post yet because the response above is pretty solid. Were you able to successfully import your files?
If not, these are some good resources on importing configs:
http://assets.nagios.com/downloads/nagi ... p_Tool.pdf
http://assets.nagios.com/downloads/nagi ... nto_XI.pdf
If not, these are some good resources on importing configs:
http://assets.nagios.com/downloads/nagi ... p_Tool.pdf
http://assets.nagios.com/downloads/nagi ... nto_XI.pdf
Re: Duplicate entries in nagiosxi
Hi What I dont understand is when I drop the Nagios and NagiosXI database in mysql and drop all of the objects in postgress I still get the config file created after installing the nagios database that no longer exist in the database ???
I am trying to rebuild a NagiosXI server that is behind a firewall that does not allow access to Dag Java or Fedora How can I push this forward
I am trying to rebuild a NagiosXI server that is behind a firewall that does not allow access to Dag Java or Fedora How can I push this forward
Re: Duplicate entries in nagiosxi
I'm a little unclear on your install steps and also your import process. Can you elaborate on the steps you've taken both to install XI and your import process?
First:
Are you able to successfully get through the install process?
Are you attempting to drop the default database data and directly import the database schemas from another server?
First:
Are you able to successfully get through the install process?
Are you attempting to drop the default database data and directly import the database schemas from another server?