Backend login to the Core Config Manager failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ibacibac
Posts: 3
Joined: Fri Aug 31, 2018 12:31 am

Backend login to the Core Config Manager failed

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Backend login to the Core Config Manager failed

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ibacibac
Posts: 3
Joined: Fri Aug 31, 2018 12:31 am

Re: Backend login to the Core Config Manager failed

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Backend login to the Core Config Manager failed

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ibacibac
Posts: 3
Joined: Fri Aug 31, 2018 12:31 am

Re: Backend login to the Core Config Manager failed

Post 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..
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Backend login to the Core Config Manager failed

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked