An error occurred while applying configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zita
Posts: 6
Joined: Tue Jun 11, 2019 12:12 am

An error occurred while applying configuration

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: An error occurred while applying configuration

Post by scottwilkerson »

If you go to CCM -> Services look at that service, on the "Check Settings" tab, are those values filled in?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
zita
Posts: 6
Joined: Tue Jun 11, 2019 12:12 am

Re: An error occurred while applying configuration

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: An error occurred while applying configuration

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
zita
Posts: 6
Joined: Tue Jun 11, 2019 12:12 am

Re: An error occurred while applying configuration

Post by zita »

total 4
-rw-rw-r-- 1 apache nagios 67 Jun 10 07:28 _sap_router.cfg
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: An error occurred while applying configuration

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
zita
Posts: 6
Joined: Tue Jun 11, 2019 12:12 am

Re: An error occurred while applying configuration

Post by zita »

Problem has been resolved by following instructions you have posted.
Thank you
Ondrej
Locked