Page 1 of 1

An error occurred while applying configuration

Posted: Mon Jun 17, 2019 1:15 am
by zita
When I try to apply configuration in Nagios XI, I receive an 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."
"Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'CPU Usage' on host '<server>'."
"Error: Could not registrer service (config file '/usr/local/Nagios/etc/services/<server>', starting on line 16."

Because of this error, I cannot add new hosts.

Please, help me to resolve this problem.

Ondrej

Re: An error occurred while applying configuration

Posted: Mon Jun 17, 2019 7:12 am
by scottwilkerson
If you go to CCM -> Services look at that service, on the "Check Settings" tab, are those values filled in?

Re: An error occurred while applying configuration

Posted: Tue Jun 18, 2019 7:41 am
by zita
I was not able to check these values because after our admin has applied manual upgrade procedure, server is no longer available in list of services/hosts and there is different error now.

"Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/<server>.cfg', starting on line 32)"

I have tried to find the file in the described path but I did not find any file with such a name.

Ondrej

Re: An error occurred while applying configuration

Posted: Tue Jun 18, 2019 7:45 am
by scottwilkerson
Can you see if <server> can be found in the CCM -> Services -> Config Name drop down

If so, select it and lets see what services show up.

If not, can you show the output of the following from the command line

Code: Select all

ls -l /usr/local/nagios/etc/import

Re: An error occurred while applying configuration

Posted: Wed Jun 26, 2019 7:00 am
by zita
total 4
-rw-rw-r-- 1 apache nagios 67 Jun 10 07:28 _sap_router.cfg

Re: An error occurred while applying configuration

Posted: Wed Jun 26, 2019 11:50 am
by benjaminsmith
HI @Zita,

Any configuration files in the import directory that end in .cfg will be automatically imported into Nagios XI every time Apply Configuration is run.

Try moving those files out of the import directory to a backup directory, and then go to Core Configuration Manger > Tools > Config File Management and then:

1. Delete Files
2. Write Configs
3. Verify Files ( if there are any errors, correct them in the CCM).
4. Then Restart Nagios Core

Let us know if you're to resolve it.

Re: An error occurred while applying configuration

Posted: Thu Jun 27, 2019 7:11 am
by zita
Problem has been resolved by following instructions you have posted.
Thank you
Ondrej