Page 1 of 1

Backend login to the Core Config Manager failed

Posted: Fri Aug 31, 2018 12:35 am
by ibacibac
NagiosXI 5.5.3

Getting the following error when trying to apply configuration:
##########################3=
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/Datacenter Level 3N Rack 7.cfg', starting on line 16)
Error: Host escalation host name is NULL
Error: Could not register host escalation (config file '/usr/local/nagios/etc/hostescalations.cfg', starting on line 49)
#######################
The file and configuration for Datacenter Level 3N Rack 7.cfg does not exist in the nagios database or file system.

If I use configuration file management to delete the files and write the configs it allows me to write changes to the CCM

Re: Backend login to the Core Config Manager failed

Posted: Fri Aug 31, 2018 10:39 am
by lmiltchev
Do you see any config errors when you write and verify files now?

CCM > Tools > Config File Management > Write Configs > Verify Files

Nagios cannot start/restart with config errors, so I would recommend that you review your configs in the CCM to find why configuration is failing.

Go to the CCM > Services, find the "offending" service (search for "Datacenter Level 3N Rack 7"), and make sure the services is assigned to a host, and it has a valid service description. Also, open the host escalations config, and see if you have any that are missing the host name.

P.S. Sometimes, these type of errors could be caused by issues with sudoers file. Have you modified sudoers from the "default" on this system?

Re: Backend login to the Core Config Manager failed

Posted: Sun Sep 02, 2018 9:42 pm
by ibacibac
No errors when I check with CCM > Tools > Config File Management > Write Configs > Verify Files. But the autoconfigure still bring up the previous errors.

'Datacenter Level 3N Rack 7' does not exist as a service in CCM so I can remove it. It also does not exist on the file system

The hostescalation file looks ok. But the error message still persists.

Nic

Re: Backend login to the Core Config Manager failed

Posted: Tue Sep 04, 2018 2:12 pm
by tgriep
If there is a left over configuration file in the import folder,with a bad setting, that could cause the issue you are having.
Remove any config files from this folder.

Code: Select all

/usr/local/nagios/etc/import/
Then see if the Apply Config can be run without any errors.

Re: Backend login to the Core Config Manager failed

Posted: Tue Sep 04, 2018 10:47 pm
by ibacibac
There was one file left in the import directory which I have deleted. The apply config error still persists.

When I run reconfigure_nagios.sh I get:
--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-08-16
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/Datacenter Level 3N Rack 7.cfg', starting on line 16)
Error: Host escalation host name is NULL
Error: Could not register host escalation (config file '/usr/local/nagios/etc/hostescalations.cfg', starting on line 27)
Error processing object config files!


***> One or more problems was encountered while processing the config files..

Re: Backend login to the Core Config Manager failed

Posted: Wed Sep 05, 2018 9:52 am
by tgriep
Can you get these files from the Nagios server and post them here so we can view them?

Code: Select all

/usr/local/nagios/etc/services/Datacenter Level 3N Rack 7.cfg
/usr/local/nagios/etc/hostescalations.cfg
/etc/my.cnf
And, if there are any files in the /etc/my.cnf.d folder, post them here as well.
Thanks