Page 1 of 1

Apply Configuration Error

Posted: Wed Dec 30, 2020 5:04 am
by KumarP
Hello,

We've recently adding large amounts of servers and services to be monitored within NagiosXI, When we try to apply the configuration were presented with the following error message: 'An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint'. It shows that the configuration setting was written successfully however the states:

'Error: Service has no host and/or service_description (config file '/usr/local/nagios/etc/services/CWMPS03.cfg', starting on line 33).
NagiosXI Applying Configuration.PNG
I was looking at the following Knowledge base article on the Nagios support website : https://support.nagios.com/kb/article/n ... d-532.html When the command './reconfigure_nagios.sh' is executed it fails to import into the CCM which is different to what is shown from the website. I can confirm the Virtual Machine has been restarted however it shows a local account is editing a service.
NagiosXI error.PNG


Below is information taken from the 'system profile'

Nagios XI version: 5.6.7
XI installed from: ova
CentOS release 6.9 (Final) 64-bit
Gnome is not installed

Any assistance would be grateful.

Re: Apply Configuration Error

Posted: Wed Dec 30, 2020 12:20 pm
by ssax
Please PM me the files you have in /usr/local/nagios/etc/import.

Then move those files out of /usr/local/nagios/etc/import:

Code: Select all

mv /usr/local/nagios/etc/import/* /var/tmp/
Then try to apply config.

If that fails, do this:

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written, try to apply configuration.

If it fails with the same error, go to Configure > Core Config Manager > Services:
- Search for CWMPS03
- Edit each of the services and make sure it has a host selected under Manage Hosts (or a hostgroup) AND that all of them have a service_description defined.
- Save
- Apply Configuration

If all that doesn't fix it, do this:

Go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written (don't do anything in between, don't apply config or anything), run this command and send me the resulting /tmp/NAGIOSBADFILES.zip file:

Code: Select all

zip -r /tmp/NAGIOSBADFILES.zip /usr/local/nagios/etc
Thank you!

Re: Apply Configuration Error

Posted: Thu Dec 31, 2020 8:33 am
by KumarP
Hi ssax,

Many thanks for your reply.

Unfortunately i am not able to PM you the files i have in /usr/local/nagios/etc/import as when i select 'Private Message' i am presented with the following message:

'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more to be able to use this feature.

I can confirm that i have moved the files which were in the location /usr/local/nagios/etc/import to /var/tmp/ and i have been able to successfully apply the configuration now.

Re: Apply Configuration Error

Posted: Mon Jan 04, 2021 1:44 pm
by benjaminsmith
Hi @KumarP,

Can you try sending this once more? It should work now. The system requires a post count of 2 or higher to be able to send a PM.

Re: Apply Configuration Error

Posted: Mon Jan 04, 2021 1:54 pm
by KumarP
Hi benjaminsmith,

Thanks for letting me know, I have just send a Private message to both yourself and ssax which included the files in the following location

/usr/local/nagios/etc/import/

Re: Apply Configuration Error

Posted: Mon Jan 04, 2021 2:53 pm
by ssax
Replied via PM, please check your private messages.