Error while updating configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hdiadmins
Posts: 8
Joined: Fri Oct 22, 2010 8:05 am
Location: São Paulo, Brazil

Error while updating configuration

Post by hdiadmins »

Hi there,
I'm trying to update some configuration files and I'm getting the following error.
Command submitted for processing...
Waiting for configuration verification.......
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.
And here's what i'm getting in httpd error log.
[Fri Oct 22 13:51:22 2010] [error] [client 10.7.4.46] PHP Notice: Undefined variable: sa in /usr/local/nagiosxi/html/config/configobject.php on line 933, referer: http://hdinagios/nagiosxi/includes/comp ... sinpalegre
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Error while updating configuration

Post by mguthrie »

Actually what you'll need to look at is in the Core Config Manager->Configuration Snapshots. The text file has config verification output from Nagios. The httpd error log will display errors for php and apache, but it won't help you with Nagios configuration problems. The zip file in the Configuration Snapshot has the saved snapshot of the bad configuration. Use the text file and the zip file to find the source of the error. If you need help identifying the source, go ahead and post the contents of the text file and we'll help you troubleshoot.

You can also check the syntax of your check command by running it manually from the command-line.

cd /usr/local/nagios/libexec #this is the location of all of your check plugins

./check_something (arguments) #use this to see if you have the correct syntax in your check.
hdiadmins
Posts: 8
Joined: Fri Oct 22, 2010 8:05 am
Location: São Paulo, Brazil

Re: Error while updating configuration

Post by hdiadmins »

That's what I could see in the end of one of those logs.
'/usr/local/nagios/etc/services/hdimaringa.cfg'...
Error: Template 'xiwizard_snmptrap_service' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/Barracuda.cfg', starting on line 63)
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 defintions. 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.
I checked the 63rd line in this file (/usr/local/nagios/etc/services/Barracuda.cfg) and it's the end of the config file. A lot of ########. Weird. :roll:
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Error while updating configuration

Post by mguthrie »

It looks like it's not finding the template called xiwizard_snmptrap_service. You may want to double check your service templates and make sure it's there. Also double check that the service is pointing to it correctly.

Just to verify: Were you reading the cfg file out of the Configuration Snapshot zip file, or were you looking at the cfg file in the /usr/local/nagios/etc/services directory? The cfg from the zip file is the one you need to identify the error.
hdiadmins
Posts: 8
Joined: Fri Oct 22, 2010 8:05 am
Location: São Paulo, Brazil

Re: Error while updating configuration

Post by hdiadmins »

Ok, I was trying to add SNMP Traps this morning and it didn't work, so I've deleted this service config via CCM and tried to apply the configuration again.
No errors now, just some warnings, but the configuration file was not applied correctly again.

Just to get it straight, we're using an old virtual XI version before buy the license, so I backed up all config files and stuff and restored in the new server. This new server was built from the ground using CentOS.

The check scripts are working correctly. ;)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Error while updating configuration

Post by mguthrie »

You can use the "Write Config Tool" from the CCM to manually write your CCM settings to the config files. Verify your settings, write both types of data, verify again, and then Apply Configuration.

Am I understanding you correctly that you're able to verify your configuration without errors, but the "Apply Configuration" is not successful? Can you outline how you verified the config, and what you did to Apply the Config and restart nagios?
hdiadmins
Posts: 8
Joined: Fri Oct 22, 2010 8:05 am
Location: São Paulo, Brazil

Re: Error while updating configuration

Post by hdiadmins »

I've found the root cause. It looks like there was an error with VMware Config Manager Wizard. I've ran an Check Configuration Files in CCM and everything looks fine after deleting the host and services messed config files. LOL.
Total Warnings: 115
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
Now I can apply config files without errors.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Error while updating configuration

Post by mmestnik »

That solution would indicate the the permissions were incorrect. Check the http://go.nagios.com/faqs for the solution.
Locked