Configuration verification failed.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
procon
Posts: 1
Joined: Fri Jul 21, 2017 9:46 am

Configuration verification failed.

Post by procon »

Good morning,

I have created a virtual machine using Ubuntu 20 LTS x64 and am attempting to do a restore to it. (My previous OS was CentOS and it became EOL) I have got the restore to take just fine. The instructions I have followed are here https://assets.nagios.com/downloads/nag ... ios-XI.pdf

My current nagiosxi version is 5.7.5 on my legacy centos os and on the current ubuntu os. When I attempt to make a change on any of the services or hosts I receive this error (on the new ubuntu os) " Configuration verification failed.
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."

This is the service I was attempting to change;
"Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/cdburn02.mis.local.cfg', starting on line 16)"

I then found this (https://support.nagios.com/kb/article.php?id=144) and have followed the steps it didn't make any difference. The cfg file has the host listed... now If I attempt to go through the gui on this service it will show that there isn't a host attached to the service. If I attempt to add the host to the service I will get this same error.

Any help on this would be most welcome.

Thanks in advance!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration verification failed.

Post by lmiltchev »

Since you followed our document, I'd assume that you have working backups/snapshots created. So, let's see why the configuration fails. Go to the Core Config Manager (CCM) > Tools > Config File Management, and click on each of the buttons in the same exact order > Delete Files > Write Configs > Verify Files. If you see any errors after any of the clicks, post the errors on the forum. If you don't see any errors, apply configuration.

Note: I know you said you followed the steps in the article but I would like to see screenshots of any errors that you are getting in the GUI (after clicking on each button). Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
dscrimpsher
Posts: 13
Joined: Wed Jan 22, 2014 4:24 pm

Re: Configuration verification failed.

Post by dscrimpsher »

I am having this same issue.
I migrated Nagios xI 5.7.3 from CentSO6.10 to a new server on Ubuntu 20.04 Installed XI 5.7.3 restored from the backup. It all looked like it was working fine. I didnt have to make any changes to the services that get checked. I upgraded to 5.8.7, no problems with upgrade.
Now when I make a change to service I get this error. I have done the Delete, Write, and Verify of the config files and the verify always shows this error. Writing the files reports all were successfully written. Verify shows the error.
I edit each service related to this file to make sure there is a host assigned (was missing). I hit the save button and then apply the config and get the error. I go back to edit the service again and the host I just added is not assigned again.

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/vm-master.csi.edu.cfg', starting on line 304)

Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
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/vm-master.csi.edu.cfg', starting on line 304)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Configuration verification failed.

Post by benjaminsmith »

Hi,
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/vm-master.csi.edu.cfg', starting on line 304)
There is a service in that file that is missing a required configuration directive. All required options will have a red * next to them in the Core Config Manager Open up the file in a text editor and navigate to line 304, and see if you can find the service and the missing entry. You can also view the configuration file from the CCM, by clicking on View Config from the actions menu. .
ccm-view-config.png
Another technique is to de-activate those services, then activate them one by one and while running the Write and Vefiy steps suggested until you find the services causing the configuration to fail.

If you cannot resolve the error, please open a seperate post or ticket to troubleshoot this further.

Thanks,
Benjamin
You do not have the required permissions to view the files attached to this post.
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!
Locked