Error updating configuration
-
newdawnccs
- Posts: 18
- Joined: Sat Feb 08, 2014 3:12 pm
Error updating configuration
So about a week ago I built a new nagios server and restored the config from backups of the old server and everything seamed fine until today when I tried to edit one of the hosts. when I tried to apply the config I recieved the following
Error: Could not find any host matching 'Cisco Nexus 5K' (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)
I went to this directory /usr/local/nagios/etc/services/ on the server and there is no file called Cisco Nexus 5K.cfg
thanks for any help
nagiosxi version 5.5.3
Error: Could not find any host matching 'Cisco Nexus 5K' (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)
I went to this directory /usr/local/nagios/etc/services/ on the server and there is no file called Cisco Nexus 5K.cfg
thanks for any help
nagiosxi version 5.5.3
You do not have the required permissions to view the files attached to this post.
Re: Error updating configuration
One thing to try is to reset the Security Credentials on the system to see if that fixes the login to the backend message.
To do that, login to the XI GUI and go to the Admin > Security Credentials menu, click on the Update Credentials button and see if the Apply Config works.
If you receive any configuration errors, follow this procedure to fix them.
Login to the XI GUI and go to the Core Config Manager
Under "Tools", click "Write Config Files" or if you are running a newer versions of XI, The menu is called "Config File Management"
Click the click the "Write" button, then the "Delete" button then click the "Write" button and then the "Verify" button
If you get any errors, resolve them and click on the "Delete" button, "Write", "Verify" until all of the errors are resolved.
Click the Apply Configuration link and click the "Apply Configuration" button after ALL of the errors are resolved.
If it still fails, open an SSH session to your Nagios XI server and execute the following commands:
Post the output here so we can view the messages.
To do that, login to the XI GUI and go to the Admin > Security Credentials menu, click on the Update Credentials button and see if the Apply Config works.
If you receive any configuration errors, follow this procedure to fix them.
Login to the XI GUI and go to the Core Config Manager
Under "Tools", click "Write Config Files" or if you are running a newer versions of XI, The menu is called "Config File Management"
Click the click the "Write" button, then the "Delete" button then click the "Write" button and then the "Verify" button
If you get any errors, resolve them and click on the "Delete" button, "Write", "Verify" until all of the errors are resolved.
Click the Apply Configuration link and click the "Apply Configuration" button after ALL of the errors are resolved.
If it still fails, open an SSH session to your Nagios XI server and execute the following commands:
Code: Select all
su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.shBe sure to check out our Knowledgebase for helpful articles and solutions!
-
newdawnccs
- Posts: 18
- Joined: Sat Feb 08, 2014 3:12 pm
Re: Error updating configuration
I followed your instructions, but I still receive the error " backend login to the core config Manager failed". I did not complete the rest of the instructions since I figured they rely on this issue being resolved
Re: Error updating configuration
Open an SSH session to your Nagios XI server and execute the following commands:
Post the output here so we can view the messages to see why the backend login is failing.
Code: Select all
su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.shBe sure to check out our Knowledgebase for helpful articles and solutions!
-
newdawnccs
- Posts: 18
- Joined: Sat Feb 08, 2014 3:12 pm
Re: Error updating configuration
Here is the output for the commands you requested.......Thanks
Last login: Wed Sep 26 07:48:22 2018 from srlc-vpit.eccrv.local
[root@localhost ~]# su nagios
[nagios@localhost root]$ cd /usr/local/nagiosxi/scripts
[nagios@localhost scripts]$ ./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/ecc-eliteweb.eccrv.local.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
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>
--------------------------------------
Importing into the CCM failed!
Last login: Wed Sep 26 07:48:22 2018 from srlc-vpit.eccrv.local
[root@localhost ~]# su nagios
[nagios@localhost root]$ cd /usr/local/nagiosxi/scripts
[nagios@localhost scripts]$ ./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/ecc-eliteweb.eccrv.local.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
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>
--------------------------------------
Importing into the CCM failed!
Re: Error updating configuration
Thanks for the output. The duplicate key entry in the MYSQL database is stopping the Apply Configuration from finishing.
To repair the database and reindex the entries, run the following as root.
Then run the reconfigure_nagios.sh script again to see if it finishes.
If it does, go in to the XI GUI and Apply the Config.
If not, can you run the following commands and post the output.
Retrieve this file from the server and attach it to the post.
And, if there are any files in the following folder, attach them as well.
To repair the database and reindex the entries, run the following as root.
Code: Select all
mysqlcheck -f -r -u root -pnagiosxi --databases nagiosql --use_frmIf it does, go in to the XI GUI and Apply the Config.
If not, can you run the following commands and post the output.
Code: Select all
mysql -V
cat /etc/*release*
uname -aCode: Select all
/etc/my.cnfCode: Select all
/etc/my.cnf.dBe sure to check out our Knowledgebase for helpful articles and solutions!
-
newdawnccs
- Posts: 18
- Joined: Sat Feb 08, 2014 3:12 pm
Re: Error updating configuration
I ran the code and it looks like the reconfigure script failed again. i have attached the files you requested. and the output as follows
[root@localhost ~]# mysqlcheck -f -r -u root -pnagiosxi --databases nagiosql --use_frm
nagiosql.tbl_command
warning : Number of rows changed from 0 to 139
status : OK
nagiosql.tbl_contact
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_contactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_contacttemplate
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_domain
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_host
warning : Number of rows changed from 0 to 147
status : OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup
warning : Number of rows changed from 0 to 14
status : OK
nagiosql.tbl_hosttemplate
warning : Number of rows changed from 0 to 54
status : OK
nagiosql.tbl_info
warning : Number of rows changed from 0 to 218
status : OK
nagiosql.tbl_lnkContactToCommandHost
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContactToCommandService
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContactToContactgroup OK
nagiosql.tbl_lnkContactToContacttemplate
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkContactToVariabledefinition
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkContactgroupToContact
warning : Number of rows changed from 0 to 8
status : OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToCommandService
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact
warning : Number of rows changed from 0 to 77
status : OK
nagiosql.tbl_lnkHostToContactgroup
warning : Number of rows changed from 0 to 213
status : OK
nagiosql.tbl_lnkHostToHost
warning : Number of rows changed from 0 to 142
status : OK
nagiosql.tbl_lnkHostToHostgroup
warning : Number of rows changed from 0 to 132
status : OK
nagiosql.tbl_lnkHostToHosttemplate
warning : Number of rows changed from 0 to 146
status : OK
nagiosql.tbl_lnkHostToVariabledefinition
warning : Number of rows changed from 0 to 145
status : OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkHosttemplateToHosttemplate
warning : Number of rows changed from 0 to 51
status : OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServiceToContact
warning : Number of rows changed from 0 to 278
status : OK
nagiosql.tbl_lnkServiceToContactgroup
warning : Number of rows changed from 0 to 490
status : OK
nagiosql.tbl_lnkServiceToHost
warning : Number of rows changed from 0 to 888
status : OK
nagiosql.tbl_lnkServiceToHostgroup OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate
warning : Number of rows changed from 0 to 878
status : OK
nagiosql.tbl_lnkServiceToVariabledefinition
warning : Number of rows changed from 0 to 869
status : OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact
warning : Number of rows changed from 0 to 3
status : OK
nagiosql.tbl_lnkServicetemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkServicetemplateToServicetemplate
warning : Number of rows changed from 0 to 85
status : OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_mainmenu
warning : Number of rows changed from 0 to 7
status : OK
nagiosql.tbl_permission
note : The storage engine for the table doesn't support repair
nagiosql.tbl_permission_inactive
note : The storage engine for the table doesn't support repair
nagiosql.tbl_service
warning : Number of rows changed from 0 to 888
status : OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_servicetemplate
warning : Number of rows changed from 0 to 95
status : OK
nagiosql.tbl_session OK
nagiosql.tbl_session_locks OK
nagiosql.tbl_settings
warning : Number of rows changed from 0 to 12
status : OK
nagiosql.tbl_submenu
warning : Number of rows changed from 0 to 29
status : OK
nagiosql.tbl_timedefinition
warning : Number of rows changed from 0 to 74
status : OK
nagiosql.tbl_timeperiod
warning : Number of rows changed from 0 to 12
status : OK
nagiosql.tbl_user
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_variabledefinition
warning : Number of rows changed from 0 to 2962
status : OK
[root@localhost ~]# su nagios
[nagios@localhost root]$ cd /usr/local/nagiosxi/scripts
[nagios@localhost scripts]$ ./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/ecc-eliteweb.eccrv.local.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
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>
--------------------------------------
Importing into the CCM failed!
[nagios@localhost /]$ mysql -V
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
[nagios@localhost /]$ cat /etc/*release*
CentOS Linux release 7.5.1804 (Core)
Derived from Red Hat Enterprise Linux 7.5 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)
cpe:/o:centos:centos:7
[nagios@localhost /]$ uname -a
Linux localhost.localdomain 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[nagios@localhost /]$
[root@localhost ~]# mysqlcheck -f -r -u root -pnagiosxi --databases nagiosql --use_frm
nagiosql.tbl_command
warning : Number of rows changed from 0 to 139
status : OK
nagiosql.tbl_contact
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_contactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_contacttemplate
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_domain
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_host
warning : Number of rows changed from 0 to 147
status : OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup
warning : Number of rows changed from 0 to 14
status : OK
nagiosql.tbl_hosttemplate
warning : Number of rows changed from 0 to 54
status : OK
nagiosql.tbl_info
warning : Number of rows changed from 0 to 218
status : OK
nagiosql.tbl_lnkContactToCommandHost
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContactToCommandService
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContactToContactgroup OK
nagiosql.tbl_lnkContactToContacttemplate
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkContactToVariabledefinition
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkContactgroupToContact
warning : Number of rows changed from 0 to 8
status : OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToCommandService
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact
warning : Number of rows changed from 0 to 77
status : OK
nagiosql.tbl_lnkHostToContactgroup
warning : Number of rows changed from 0 to 213
status : OK
nagiosql.tbl_lnkHostToHost
warning : Number of rows changed from 0 to 142
status : OK
nagiosql.tbl_lnkHostToHostgroup
warning : Number of rows changed from 0 to 132
status : OK
nagiosql.tbl_lnkHostToHosttemplate
warning : Number of rows changed from 0 to 146
status : OK
nagiosql.tbl_lnkHostToVariabledefinition
warning : Number of rows changed from 0 to 145
status : OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkHosttemplateToHosttemplate
warning : Number of rows changed from 0 to 51
status : OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServiceToContact
warning : Number of rows changed from 0 to 278
status : OK
nagiosql.tbl_lnkServiceToContactgroup
warning : Number of rows changed from 0 to 490
status : OK
nagiosql.tbl_lnkServiceToHost
warning : Number of rows changed from 0 to 888
status : OK
nagiosql.tbl_lnkServiceToHostgroup OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate
warning : Number of rows changed from 0 to 878
status : OK
nagiosql.tbl_lnkServiceToVariabledefinition
warning : Number of rows changed from 0 to 869
status : OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact
warning : Number of rows changed from 0 to 3
status : OK
nagiosql.tbl_lnkServicetemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_lnkServicetemplateToServicetemplate
warning : Number of rows changed from 0 to 85
status : OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_mainmenu
warning : Number of rows changed from 0 to 7
status : OK
nagiosql.tbl_permission
note : The storage engine for the table doesn't support repair
nagiosql.tbl_permission_inactive
note : The storage engine for the table doesn't support repair
nagiosql.tbl_service
warning : Number of rows changed from 0 to 888
status : OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_servicetemplate
warning : Number of rows changed from 0 to 95
status : OK
nagiosql.tbl_session OK
nagiosql.tbl_session_locks OK
nagiosql.tbl_settings
warning : Number of rows changed from 0 to 12
status : OK
nagiosql.tbl_submenu
warning : Number of rows changed from 0 to 29
status : OK
nagiosql.tbl_timedefinition
warning : Number of rows changed from 0 to 74
status : OK
nagiosql.tbl_timeperiod
warning : Number of rows changed from 0 to 12
status : OK
nagiosql.tbl_user
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_variabledefinition
warning : Number of rows changed from 0 to 2962
status : OK
[root@localhost ~]# su nagios
[nagios@localhost root]$ cd /usr/local/nagiosxi/scripts
[nagios@localhost scripts]$ ./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/ecc-eliteweb.eccrv.local.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
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>
--------------------------------------
Importing into the CCM failed!
[nagios@localhost /]$ mysql -V
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
[nagios@localhost /]$ cat /etc/*release*
CentOS Linux release 7.5.1804 (Core)
Derived from Red Hat Enterprise Linux 7.5 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)
cpe:/o:centos:centos:7
[nagios@localhost /]$ uname -a
Linux localhost.localdomain 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[nagios@localhost /]$
You do not have the required permissions to view the files attached to this post.
Re: Error updating configuration
Can you run the following commands and post the /tmp/info.txt file here?
This will dump the structure of the mysql table that is generating the error as well as all of the host configurations on your system.
If you do not want to post it, you cam pm it to me or to the shared "Nagios Support" account so the other techs can get it if I am unavailable.
In the config_name that is failing, are there any special characters in it?
Code: Select all
echo 'desc tbl_host;' | mysql -t -pnagiosxi nagiosql >/tmp/info.txt
echo 'select * from tbl_host;' | mysql -t -pnagiosxi nagiosql >>/tmp/info.txt
ls -l /usr/local/nagios/etc >>/tmp/info.txt
If you do not want to post it, you cam pm it to me or to the shared "Nagios Support" account so the other techs can get it if I am unavailable.
In the config_name that is failing, are there any special characters in it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
newdawnccs
- Posts: 18
- Joined: Sat Feb 08, 2014 3:12 pm
Re: Error updating configuration
I ran the commands and attached the output file.
I did not notice any special characters in the config error. one thing i did notice is that it is complaining about this file "Error: Could not find any host matching 'Cisco Nexus 5K' (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)"
here is the directory listing of /usr/local/nagios/etc/services I noticed there is no file called "Cisco Nexus 5K.cfg"
[root@localhost /]# cd /usr/local/nagios/etc/services
[root@localhost services]# dir
10.1.3.234.cfg SRL-IL-COTTAGE-37.cfg
192.168.1.12.cfg SRL-IL-COTTAGE-38.cfg
192.168.1.14.cfg SRL-IL-COTTAGE-39.cfg
192.168.1.36.cfg SRL-IL-COTTAGE-40.cfg
192.168.1.3.cfg SRL-IL-COTTAGE-41.cfg
192.168.1.9.cfg SRL-IL-COTTAGE-42.cfg
192.168.8.10.cfg SRL-IL-COTTAGE-43.cfg
Barracuda.cfg SRL-IL-COTTAGE-46.cfg
Cisco\ Nexus5K.1.cfg SRL-IL-COTTAGE-fiber.cfg
Cisco\ Nexus\ 5K.2.cfg SRL-InformaCast.cfg
Cisco\ Nexus5k.3.cfg srl-mailarch.eccrv.local.cfg
COGH-2960-Letort.cfg srl-mp.eccrv.local.cfg
COGH-BAK.cfg SRL-NEXT-LEVEL.cfg
COGH-EMPOWER.cfg SRL\ Online\ Application.cfg
COGH\ Front\ door\ controller.cfg srl-phonesys.eccrv.local.cfg
COGH-FS2DC.cfg SRL-PR-MEDREC-1.cfg
COGH-HENDERSON-2960.cfg SRL-PR-MEDREC-2.cfg
COGH-Henderson\ NOC.cfg SRL-PR-MEIER-1.cfg
COGH-KITCHEN-2960.cfg SRL-PR-NOC-1.cfg
COGH-LOVE-2950.cfg SRL-PR-NOC-2.cfg
COGH-NEXT-LEVEL.cfg SRL-PR-NOC-3.cfg
COGH-NOC-2960.cfg SRL-PR-PH2SOUTH-2ND-2.cfg
COGH-NOC-2960\ POE.cfg SRL-PR-PH2SOUTH-2ND.cfg
COGH-NOC-3560.cfg SRL-PR-PH2SOUTH-LL.cfg
COGH\ NOC\ Door\ Controller.cfg SRL-PR-PHONEVG-1\ .cfg
COGH-SERVICES.cfg SRL-PR-SIMPLEX-1.cfg
cogh-srvcs.cfg SRL-PR-SIMPLEX-2.cfg
cucm1.eccrv.local.cfg SRL-PR-VPIT-1.cfg
cucm2.eccrv.local.cfg srl-rds10.eccrv.local.cfg
cucxn1.eccrv.local.cfg srl-rds11.eccrv.local.cfg
cucxn2.eccrv.local.cfg srl-rds12.eccrv.local.cfg
cup1.eccrv.local.cfg srl-rds13.eccrv.local.cfg
Dell\ M1000e\ cmc-dct4xk2.cfg srl-rds14.eccrv.local.cfg
ecc-elite.eccrv.local.cfg srl-rds15.eccrv.local.cfg
ecc-eliteweb.eccrv.local.cfg srl-rds3.eccrv.local.cfg
ecc-fs3.eccrv.local.cfg srl-resicheck.eccrv.local.cfg
ecc-fs4.eccrv.local.cfg SRL-TC-FOODSRVC.cfg
elite-sand.eccrv.local.cfg srl-tc-fs01DC.eccrv.local.cfg
informacast\ .cfg SRL-TC-GROUND-1.cfg
Internet.cfg SRL-TC-GROUND-2.cfg
Letort\ Door\ Controller.cfg SRL-TC-HCC1-1.cfg
localhost.cfg SRL-TC-HCC1-2.cfg
nds-fs1.eccrv.local.cfg SRL-TC-PHONERM-1.cfg
nds-vm1.eccrv.local.cfg SRL-TC-WCC-1.cfg
nds-vm2.eccrv.local.cfg srl-ucs-c-220m3-esxi-01.eccrv.local.cfg
nds-vm3.eccrv.local.cfg srl-ucs-c-220m3-esxi-02.eccrv.local.cfg
Peace\ Wing\ Door\ Controller.cfg SRL-VPN.eccrv.local.cfg
Personal\ Care\ Door\ Controller.cfg SR-NOC-CC-RACK.cfg
PR-VG224-01.cfg SR-POPRUN-HC.cfg
PR-VG224-02.cfg SR-TC-WCC2-SW2.cfg
PR-VG224-03.cfg SR-TWNCNT-HCC3SUPERV.cfg
PR-VG224-04.cfg SR-TWNCNT-MEDREC.cfg
PR-VG224-05.cfg SYS-BAK-NAS.cfg
PR-VG224-06.cfg SYS-NEXT-LEVEL.cfg
PR-VG224-07.cfg SYS-NOC-3560.cfg
PR-VG224-08.cfg SYS-POWER-MANAGER.cfg
PR-VG224-09.cfg SYS-SonicWall.cfg
PR-VG224-10.cfg TC-VG224-01.cfg
PR-VG224-11.cfg TC-VG224-02.cfg
PR-VG224-12.cfg TC-VG224-03.cfg
PR-WLC2504-01.cfg TC-VG224-04.cfg
PR-WLC2504-02.cfg TC-VG224-05.cfg
PR-WLC2504-03.cfg TC-VG224-06.cfg
recept\ ip\ camera.cfg TC-VG224-07.cfg
SR-CC-LAUNDRY.cfg TC-VG224-08.cfg
srl-bak.eccrv.local.cfg TC-VG224-09.cfg
srlc-broker.eccrv.local.cfg TC-VG224-10.cfg
srlc-rds1.eccrv.local.cfg TC-WCC-1-RM106.cfg
srlc-rds2.eccrv.local.cfg TC-WLC2504-04.cfg
srl-empower.eccrv.local.cfg TC-WLC2504-05.cfg
srl-exch.eccrv.local.cfg vcenter.cogh.org.cfg
SRL-IL-COTTAGE-35.cfg vcenter.eccrv.local.cfg
SRL-IL-COTTAGE-36.cfg XIBO-Server.cfg
I did not notice any special characters in the config error. one thing i did notice is that it is complaining about this file "Error: Could not find any host matching 'Cisco Nexus 5K' (config file '/usr/local/nagios/etc/services/Cisco Nexus 5K.cfg', starting on line 3565)"
here is the directory listing of /usr/local/nagios/etc/services I noticed there is no file called "Cisco Nexus 5K.cfg"
[root@localhost /]# cd /usr/local/nagios/etc/services
[root@localhost services]# dir
10.1.3.234.cfg SRL-IL-COTTAGE-37.cfg
192.168.1.12.cfg SRL-IL-COTTAGE-38.cfg
192.168.1.14.cfg SRL-IL-COTTAGE-39.cfg
192.168.1.36.cfg SRL-IL-COTTAGE-40.cfg
192.168.1.3.cfg SRL-IL-COTTAGE-41.cfg
192.168.1.9.cfg SRL-IL-COTTAGE-42.cfg
192.168.8.10.cfg SRL-IL-COTTAGE-43.cfg
Barracuda.cfg SRL-IL-COTTAGE-46.cfg
Cisco\ Nexus5K.1.cfg SRL-IL-COTTAGE-fiber.cfg
Cisco\ Nexus\ 5K.2.cfg SRL-InformaCast.cfg
Cisco\ Nexus5k.3.cfg srl-mailarch.eccrv.local.cfg
COGH-2960-Letort.cfg srl-mp.eccrv.local.cfg
COGH-BAK.cfg SRL-NEXT-LEVEL.cfg
COGH-EMPOWER.cfg SRL\ Online\ Application.cfg
COGH\ Front\ door\ controller.cfg srl-phonesys.eccrv.local.cfg
COGH-FS2DC.cfg SRL-PR-MEDREC-1.cfg
COGH-HENDERSON-2960.cfg SRL-PR-MEDREC-2.cfg
COGH-Henderson\ NOC.cfg SRL-PR-MEIER-1.cfg
COGH-KITCHEN-2960.cfg SRL-PR-NOC-1.cfg
COGH-LOVE-2950.cfg SRL-PR-NOC-2.cfg
COGH-NEXT-LEVEL.cfg SRL-PR-NOC-3.cfg
COGH-NOC-2960.cfg SRL-PR-PH2SOUTH-2ND-2.cfg
COGH-NOC-2960\ POE.cfg SRL-PR-PH2SOUTH-2ND.cfg
COGH-NOC-3560.cfg SRL-PR-PH2SOUTH-LL.cfg
COGH\ NOC\ Door\ Controller.cfg SRL-PR-PHONEVG-1\ .cfg
COGH-SERVICES.cfg SRL-PR-SIMPLEX-1.cfg
cogh-srvcs.cfg SRL-PR-SIMPLEX-2.cfg
cucm1.eccrv.local.cfg SRL-PR-VPIT-1.cfg
cucm2.eccrv.local.cfg srl-rds10.eccrv.local.cfg
cucxn1.eccrv.local.cfg srl-rds11.eccrv.local.cfg
cucxn2.eccrv.local.cfg srl-rds12.eccrv.local.cfg
cup1.eccrv.local.cfg srl-rds13.eccrv.local.cfg
Dell\ M1000e\ cmc-dct4xk2.cfg srl-rds14.eccrv.local.cfg
ecc-elite.eccrv.local.cfg srl-rds15.eccrv.local.cfg
ecc-eliteweb.eccrv.local.cfg srl-rds3.eccrv.local.cfg
ecc-fs3.eccrv.local.cfg srl-resicheck.eccrv.local.cfg
ecc-fs4.eccrv.local.cfg SRL-TC-FOODSRVC.cfg
elite-sand.eccrv.local.cfg srl-tc-fs01DC.eccrv.local.cfg
informacast\ .cfg SRL-TC-GROUND-1.cfg
Internet.cfg SRL-TC-GROUND-2.cfg
Letort\ Door\ Controller.cfg SRL-TC-HCC1-1.cfg
localhost.cfg SRL-TC-HCC1-2.cfg
nds-fs1.eccrv.local.cfg SRL-TC-PHONERM-1.cfg
nds-vm1.eccrv.local.cfg SRL-TC-WCC-1.cfg
nds-vm2.eccrv.local.cfg srl-ucs-c-220m3-esxi-01.eccrv.local.cfg
nds-vm3.eccrv.local.cfg srl-ucs-c-220m3-esxi-02.eccrv.local.cfg
Peace\ Wing\ Door\ Controller.cfg SRL-VPN.eccrv.local.cfg
Personal\ Care\ Door\ Controller.cfg SR-NOC-CC-RACK.cfg
PR-VG224-01.cfg SR-POPRUN-HC.cfg
PR-VG224-02.cfg SR-TC-WCC2-SW2.cfg
PR-VG224-03.cfg SR-TWNCNT-HCC3SUPERV.cfg
PR-VG224-04.cfg SR-TWNCNT-MEDREC.cfg
PR-VG224-05.cfg SYS-BAK-NAS.cfg
PR-VG224-06.cfg SYS-NEXT-LEVEL.cfg
PR-VG224-07.cfg SYS-NOC-3560.cfg
PR-VG224-08.cfg SYS-POWER-MANAGER.cfg
PR-VG224-09.cfg SYS-SonicWall.cfg
PR-VG224-10.cfg TC-VG224-01.cfg
PR-VG224-11.cfg TC-VG224-02.cfg
PR-VG224-12.cfg TC-VG224-03.cfg
PR-WLC2504-01.cfg TC-VG224-04.cfg
PR-WLC2504-02.cfg TC-VG224-05.cfg
PR-WLC2504-03.cfg TC-VG224-06.cfg
recept\ ip\ camera.cfg TC-VG224-07.cfg
SR-CC-LAUNDRY.cfg TC-VG224-08.cfg
srl-bak.eccrv.local.cfg TC-VG224-09.cfg
srlc-broker.eccrv.local.cfg TC-VG224-10.cfg
srlc-rds1.eccrv.local.cfg TC-WCC-1-RM106.cfg
srlc-rds2.eccrv.local.cfg TC-WLC2504-04.cfg
srl-empower.eccrv.local.cfg TC-WLC2504-05.cfg
srl-exch.eccrv.local.cfg vcenter.cogh.org.cfg
SRL-IL-COTTAGE-35.cfg vcenter.eccrv.local.cfg
SRL-IL-COTTAGE-36.cfg XIBO-Server.cfg
You do not have the required permissions to view the files attached to this post.
Re: Error updating configuration
Couple of things to do.
Go to this folder and remove any file in there
That is where the new configs are added to the system and is there is a bad entry, that could cause an error.
Then, login to the XI GUI and go to the Core Config Manager > Hosts menu and disable the "Cisco Nexus 5K" host and also disable the service assigned to it.
In the MYSQL table, I see a blank host entry. In the Core COnfig Manager > Hosts menu, do you see an empty entry?
If so, delete that and see if you can Apply the Config.
Go to this folder and remove any file in there
Code: Select all
/usr/local/nagios/etc/import/Then, login to the XI GUI and go to the Core Config Manager > Hosts menu and disable the "Cisco Nexus 5K" host and also disable the service assigned to it.
In the MYSQL table, I see a blank host entry. In the Core COnfig Manager > Hosts menu, do you see an empty entry?
If so, delete that and see if you can Apply the Config.
Be sure to check out our Knowledgebase for helpful articles and solutions!