Page 1 of 1

Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 12:26 pm
by tmattingly
At the end of the upgrade though the rest of it looked successful I received the following. I did not receive this same error on the last upgrade. Not sure where to go look or even how to fix this so asking for some help.


--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/fai02020.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 552
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 906
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 552
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 906
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 552
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 906
ERROR
Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>
- Importing: /usr/local/nagios/etc/import/xi_timeperiod_24x7.cfg .. SUCCESS
--------------------------------------

Importing into the CCM failed!

Tom

Re: Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 12:36 pm
by scottwilkerson
Lets remove all the item in the import directory

Code: Select all

rm -f /usr/local/nagios/etc/import/*

Re: Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 12:52 pm
by tmattingly
After rerunning ./upgrade , That was the ticket! You might want to consider updating your instructions on https://assets.nagios.com/downloads/nag ... ctions.pdf (or in the upgrade code) to include this command?

One other question... I am getting Warning duplication definitions (about 15-20) just before the Running pre-flight check notification...

How do I go track those down and remove duplicates? For example,

Warning: Duplicate definition found for service 'ADMIN1 Oracle instance' on host 'fai02021' (config file '/usr/local/nagios/etc/services/cerner_admindb.cfg', starting on line 14)

Re: Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 1:12 pm
by scottwilkerson
You will want to search your services in the CCM for "ADMIN1 Oracle instance"

then look through each making sure you are not attaching both a host and hostgroup to the same service name that match.

for example, if the host fai02021 is attached to one of the listed, and it is also part of a hostgroup that is also attached to a service with the same name, you would get duplicate definitions warning.

Re: Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 1:23 pm
by tmattingly
Is that searching through the gui? If yes then all I get is this (see attachement). If not through the gui where/what files do I look or what tools do I use to search?

Re: Upgrading from 5.5.8 to 5.5.10 Success but Failed

Posted: Mon Feb 25, 2019 4:59 pm
by scottwilkerson
No, in Configure -> Core Config Manager -> Services