Page 1 of 2

Config Error After Update

Posted: Fri Jul 11, 2014 3:03 pm
by toleolu
When verifying the config after updating, it's throwing all kinds of errors about services.cfg files not having service_description:

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/svrmmmc15.hhsc.org.cfg', starting on line 81)
Error processing object config files!

That's a legit server in one of our Maui hospitals, but the Description field is blank as is pretty much all of our servers. I'm not going to have to go through and add a description on all of this to run this update am I ?

Also, I've got a number of APC UPS ****.cfg files in the services directory. I don't know where they came from, didn't think you could have spaces in Linux file name, anyway, I deleted them from the command line, opened Nagios and as a test, added a description in the svrmmmc15.hhsc.org host, tried to apply that, and it errored again, plus it added those UPS files back in, which I'm sure it did that because it loaded the last good config.

UPDATE:

When I look at svrmmmc15.hhsc.org.cfg none of the service_description fields are blank only the host description field is blank. I attached the .cfg file.

Thanks

Re: Config Error After Update

Posted: Sun Jul 13, 2014 3:05 pm
by Box293
The error is not being explained correctly (appears to be a bug), but it is pointing to the service with the problem.

Your "Print Spooler" server is not assigned to any hosts (host_name) or host groups (hostgroup_name). This is what is causing the problem.

Re: Config Error After Update

Posted: Mon Jul 14, 2014 12:14 pm
by toleolu
Attached is a screen shot of that service. Shows Print Spooler in the Description field.

Re: Config Error After Update

Posted: Mon Jul 14, 2014 12:31 pm
by toleolu
To make matters worse:

These files are back, but I don't see them in Services in the CCM, and I can't delete them from the command line. Tried rm -f but no joy.

Re: Config Error After Update

Posted: Mon Jul 14, 2014 12:41 pm
by sreinhardt
Those files are likely back, as the update attempts an apply config then a verification. If the apply config did not result in a good config, it will revert to the last known good config, which may contain unexpected files that were previously deleted. You should go through the manual verification steps, then update again.

Configure->Tools->Write Config Files
Write and verify your files, but do not restart.
You should get any config errors listed, and your flat files will stay with the error prone versions until an apply config is done.
Any errors that you get should be corrected in CCM, again do not apply config here, then start again with write and verify until no errors are found, warnings are fine.

Once all errors are corrected, you can continue with another ./upgrade to complete the changes needed.

Re: Config Error After Update

Posted: Mon Jul 14, 2014 1:06 pm
by toleolu
OK, I restored the VM from a snapshot I made prior to downloading the update:

Before I go any further with this, I was going to first go ahead and delete those APC UPS files. But before I do, I just wanted to confirm something.

When creating services, any data that's entered in fields marked as required (*) cannot contain spaces or other characters that Linux filenames don't like. Is that correct??

Re: Config Error After Update

Posted: Mon Jul 14, 2014 2:19 pm
by lmiltchev
Correct. There is a number of characters that you cannot use in the object definitions.

Code: Select all

grep "illegal_object_name_chars=" /usr/local/nagios/etc/nagios.cfg

Re: Config Error After Update

Posted: Mon Jul 14, 2014 3:25 pm
by toleolu
Thanks.

So I downloaded the update, I'll run it to the point of running the ./upgrade, go into CCM and write then verify the config files, once I get that to where there are no errors, then I'll run the upgrade script. Correct?

Re: Config Error After Update

Posted: Mon Jul 14, 2014 3:27 pm
by sreinhardt
Yes that is correct, start update it may or may not fail, if it does verify configs until working properly then finish update.

Re: Config Error After Update

Posted: Mon Jul 14, 2014 3:34 pm
by lmiltchev
If you don't get any config errors during the upgrade, you won't need to run the "upgrade" script again. However, if you get some config errors, you will need to fix them and then re-run the script. Please, see our wiki post on the topic:

http://support.nagios.com/wiki/index.ph ... 14_Upgrade