Page 1 of 1

CCM unable to apply configuration

Posted: Thu Apr 25, 2019 3:19 am
by davehkent
Hi,

I have an odd problem applying configuration in NagiosXI CCM. We are currently running 5.5.11.

When I click 'Apply Configuration' we get the following two error messages:
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.

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1096)
The _multiple_hosts.cfg dates back from one Nagios updates we did a few years ago, where a lot of service checks ended up with that config name. For this particular error, we could not see any issue with line 1096, but it appears that what ever file generated this error reverted back to the original when it failed, as per the first message.

To aid debugging, I went through and renamed every service with the name _multiple_host to something more meaningful for each. This is now fine if I got to Config File Management, Delete, Write, Verify and Restart. However Apply Configuration still fails. I also tried disabling all services except a single localhost ping check. Still we get the same message.

To me, it looks as if we have some old configuration state stuck somewhere. I did also try a reboot, which did not work.

Does anyone know a way to either clear this or steps to see how we can stop config files reverting so we can step in and find out what is causing this error?

Re: CCM unable to apply configuration

Posted: Thu Apr 25, 2019 10:36 am
by benjaminsmith
Hi Dave,

The _multiple_hosts.cfg has a host or service definition that is missing required values. When did you start having trouble applying configuration? You could compare the old file to the current one to see what has changed. When you go to Configure > CCM > Config File Management > Verify Files. Do you get an error? Once this is corrected, you should be able to apply config.

Can you send me your system profile and I can take a closer look?

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket.

Re: CCM unable to apply configuration

Posted: Mon Apr 29, 2019 6:01 am
by davehkent
Hi,

Thanks for the response, I will send you the profile.zip in a minute. The actual download a profile gives an error:
PROFILE BUILD FAILED

Array
(
)

CODE: 1
I can cut and paste the text from 'View System Info' for you.

The problem we have is that there are no longer any service checks with the config name _multiple_hosts, so this file should not exist any more. However as it claims the error is on line 1096, it thinks both the file is still there and there is a lot in it.

I do not get any errors from Config File Management -> Verify Files. It is just the Apply Configuration button that has broken.

The actual problems started shortly before Easter. Unfortunately members of my team continued to make quite a lot of changes without resolving the problem. In addition, I renamed all the services called _multiple_hosts, so now there are masses of changes between the last known good configuration. However, we can generate a good configuration by using the Config File Management route, so the changes between that good config and clicking 'apply configuration' should be zero.

Re: CCM unable to apply configuration

Posted: Mon Apr 29, 2019 6:04 am
by davehkent
As another follow up, I do not have permissions to send private messages.

Re: CCM unable to apply configuration

Posted: Mon Apr 29, 2019 10:40 am
by benjaminsmith
Hi Dave,

The error message your seeing when trying to generate the system profile is usually the result of an incorrect sudoers file. Please follow the steps in the knowledgebase article below to resolve the error.

Please take a backup before making any changes.

Nagios XI - Profile Build Failed

Re: CCM unable to apply configuration

Posted: Thu May 02, 2019 3:57 am
by davehkent
Hi,

Thanks for your help. The issues are now resolved. Both the profile generation and apply configuration was down to sudo permissions.

We had installed our nagios in the most paranoid way and have had to do some permission tweaking in the past. One step was missing from our documentation. We are on RHEL6, which is end of life soon, so when we move to a newer RHEL version we plan to go with the standard recommended nagios install.

Re: CCM unable to apply configuration

Posted: Thu May 02, 2019 10:16 am
by benjaminsmith
Hi Dave,
Thanks for your help. The issues are now resolved. Both the profile generation and apply configuration was down to sudo permissions.
Great! Glad to hear it's been resolved. I'll close out this thread.

Thank you for using the Nagios Support Forum.