Upgrading to 2014

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
c.slagel
Posts: 57
Joined: Mon Dec 17, 2012 6:47 pm

Upgrading to 2014

Post by c.slagel »

Running the upgrade script errors out:

Code: Select all

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

  make install-init
     - This installs the init script in /etc/rc.d/init.d

  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file

  make install-config
     - This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.5'
Running configuration check... CONFIG ERROR!  Restart aborted.  Check your Nagios configuration.
[root@nagios nagiosxi]# 
The config should be fine though as it's what we are currently using and it gets no errors on an update. What could be causing this?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Upgrading to 2014

Post by slansing »

We have been seeing this a lot since the release, it's likely due to ghost hosts/services, what you should do is go to CCM > Tools > Write Config > Write then Verify, if you have errors here it's likely that once you follow them down the rabbit hole you will see a ghost host/service configuration that you will need to remove.
c.slagel
Posts: 57
Joined: Mon Dec 17, 2012 6:47 pm

Re: Upgrading to 2014

Post by c.slagel »

Ah OK, yes. I am getting this:

Code: Select all

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/NOXweb3.cfg', starting on line 14) 

Nagios Core 4.0.5 
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors 
Copyright (c) 1999-2009 Ethan Galstad 
Last Modified: 04-11-2014 
License: GPL 

Website: http://www.nagios.org 
Reading configuration data... 
Read main config file okay... 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting at line 14) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting at line 136) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 14) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 117) 
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/NOXweb3.cfg', starting on line 14) 
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. 
Found the issue and removed it. Now do I have to run the upgrade script all over again...? I restarted and it didn't seem to work.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Upgrading to 2014

Post by slansing »

Yes, you will want to complete the upgrade by running it again, it will skip over much of what it has done already.
I restarted and it didn't seem to work.
We're going to need a bit more to go on than just this, what did not work, what did you see??
cwireless
Posts: 66
Joined: Sat Feb 05, 2011 11:37 pm

Re: Upgrading to 2014

Post by cwireless »

I have a similar error when making the upgrade:

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/montag.cfg', starting on line 14)
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.[/color][/color]

ll montag.cfg file to verify that error exists but I see so normal:

define service {
service_description Web Transaction
use xiwizard_webtransaction_webinject_service
check_command check_xi_service_webinject!10_251_0_201__Web_Transaction_config.xml!!!!!!!
max_check_attempts 3
check_interval 30
retry_interval 15
check_period 24x7
obsess_over_service 0
flap_detection_enabled 0
notification_interval 60
notification_period ------no mostrar----- #confidential
notification_options w,u,r,c
notifications_enabled 1
contacts -----no mostrar---- #confidential
register 1
}


if I can give support

grateful
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Upgrading to 2014

Post by sreinhardt »

Your config is stating that there is no host or hostgroup assigned to that service, which your configuration confirms. You should either remove this service, or add a host to it's configurations. Also if this is a continuing issue, please open your own thread so that we know when this OP's thread is complete as well as yours.
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.
highness
Posts: 192
Joined: Thu May 01, 2014 4:25 pm

Re: Upgrading to 2014

Post by highness »

We were seeing the same issue(s) when we upgraded today as well. We weren't able to add any service(s) to the host, as the host configuration was b0rked.

What we ended up doing was this:

1. Find which host that it was complaining about not having a service.
2. Find all the services associated with that host and delete them.
3. Find the host and delete it.
4. Attempt to start up Nagios again.
5. If the same issue appears, just with a different host, goto 1.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Upgrading to 2014

Post by sreinhardt »

Thanks for the steps highness, I might suggest deactivating instead of deleting objects, but to each their own. Otherwise I would agree with your steps, either deactivation or resolve the issues that the configuration is complaining about.
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.
Locked