Page 1 of 2

Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 9:46 am
by costanza2k1
Hi all,

We are currently running 2012R2.8c and are planning to upgrade to 2014. In addition to the upgrade we also plan on moving to a clean physical server from our virtual build. Our DB is currently off loaded and we plan on keeping it that way. The last time we tried to do a move from the virtual to physical our monitoring engine kept dying every 2-7 minutes and then restarting itself. Any suggestions or comments?

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 10:57 am
by slansing
Hmm, did we troubleshoot that issue with you? I seem to recall something along those lines. It should be as simple as transferring your db connection configurations to the new physical server, following the offloading document.

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 12:05 pm
by highness
I work with costanza2k1 - Here is what we're trying to do and what we're seeing:

1. We currently run 2012R2.8C on a VM and have an offloaded MySQL database. We are attempting to migrate from virtual to physical hardware.
2. I've built a new instance on hardware (instead of VM) using the latest 2014R1 version. The version appears to run correctly.
3. I ran /usr/local/nagiosxi/scripts/backup_xi.sh (which I only commented out the MySQL section, since I don't need to backup the database because it's been offloaded).
4. Copied the /store/backups/nagiosxi/ tar file from the virtual to the physical.
5. Restored the backup using /usr/local/nagiosxi/scripts/restore_xi.sh (again, I commented out the MySQL section).
6. The restore appears to work, as our hosts and alerts show up on the physical box.

The issue is that after the restore, the menu shows us running the 2012R2.8C version again (all I did was an import, not a downgrade of the software).
It also tells us that there is a newer version of the software available for download.

I downloaded the software and tried to do an upgrade, but see the following messages:

Code: Select all

*** Exfoliation theme installed ***
NOTE: Use 'make install-classicui' to revert to classic Nagios theme

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.5'
make install-basic
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.5'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/archives
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/spool/checkresults

*** 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@fe1 nagiosxi]# 
So, how can we fix this?

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 12:06 pm
by costanza2k1
This is what we see when writing the config file:

Code: Select all

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

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/xxxxxxx.cfg', starting on line 110) 
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. 

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 12:53 pm
by vAJ
Don't think it's wise to take a backup from an older version and restore it to a newer version...

Ideal course of action would be to either:
1.) Start with 2013r2.8 on the new setup, restore, then upgrade
2.) Upgrade your VM (backing up beforehand!!), backup again post upgrade, restore to physical stack.

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 1:32 pm
by sreinhardt
I couldn't agree more with vAJ, restoring to a different version, regardless if you included the DBs or not, will have potentially unknown issues, as it seems you found. Now that said, I would have guessed that doing a ./upgrade would resolve the issue for the most part, but it seems to be having some issues with the new release. I would highly suggest redoing the new machine with 2012, transfering data via backup\restore, then upgrading.

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 1:40 pm
by costanza2k1
Thanks vAJ! We did exactly that and got multiple errors. We are going to blow away the physical again and then start over without touching our off loaded DB. Nothing should upgrade the off loaded DB in going to 2014 right?

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 1:46 pm
by vAJ
No, I believe there is a MySQL upgrade included in 2014. Not to mention schema updates that the Nagios guys can speak more to.

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 2:40 pm
by sreinhardt
There are absolutely mysql and postgresdb updates with 2014, it's kind of inevitable with the changes to CCM and core 4 config options that were added. That's why I would suggest either updating the current box to 2014, then transferring, or making the new one 2012 first, transferring, then updating. The choice is yours, it really shouldn't matter too much which route you take, but please please backup. :D

Re: Nagios XI Upgrade/Move Suggestions

Posted: Wed May 14, 2014 2:43 pm
by costanza2k1
backup is our friend, we cleaned out some of the errors and are working just fine now. Thanks for being a sounding board.