Config Error After Update

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Config Error After Update

Post 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
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Config Error After Update

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Config Error After Update

Post by toleolu »

Attached is a screen shot of that service. Shows Print Spooler in the Description field.
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Config Error After Update

Post 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.
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Config Error After Update

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Config Error After Update

Post 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??
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Config Error After Update

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Config Error After Update

Post 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?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Config Error After Update

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Config Error After Update

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked