Page 1 of 1

How to transfer Nagios XI to new server

Posted: Mon Nov 30, 2020 9:04 am
by RyanMule
Hello Everyone,

I am looking for some guidance on how to transfer Nagios XI to a new server. We are currently running Nagios XI 5.6.14 on a CentOS 6 VM and the database is sitting on a separate CenOS 6 VM. In theory we would like to upgrade the database server to CentOS 8 and do a mysqldump. Our goal is to be on CentOS 8 and the latest Nagios XI release.

What would be the most efficient way to copy the front end server over? Is there a way to retain all the settings?

Thank you,
Ryan

Re: How to transfer Nagios XI to new server

Posted: Tue Dec 01, 2020 5:36 pm
by ssax
I would probably stick with EL7 latest instead of EL8 at this point in time as there are a number of 3rd party plugins/tools that aren't compatible with EL8. Dell's EMC wizard and the vmware perl SDK being the ones I currently know about. You can go to EL8 if you'd like but personally I would use EL7 latest for compatibility reasons. It's easy enough to migrate once you get the hang of it. The XI backup/restore process makes this pretty easy:

The process to migrate is this:
- Spin up new server running EL7/EL8 latest

- Install the exact same version of XI that the old server has on the new server, no need to configure it, just install it (do not try to restore over different versions you will cause issues)

https://assets.nagios.com/downloads/nag ... Linux.pdf​

- If you have a RAMDisk installed or are using RRDCacheD on the old system, set them up before restoring:

https://assets.nagios.com/downloads/nag ... osXI.pdf​​
https://assets.nagios.com/downloads/nag ... os-XI.pdf​

- Backup the old/transfer to new

- Since your production server has an offloaded DB, before running the restore on the new server, edit this file:

Code: Select all

/usr/local/nagiosxi/scripts/restore_xi.sh
Around line 253, remove these lines:

Code: Select all

# RE-IMPORT ALL XI CFG VARS
. $BASEDIR/../var/xi-sys.cfg
php $BASEDIR/import_xiconfig.php > $BASEDIR/config.dat
. $BASEDIR/config.dat
rm -rf $BASEDIR/config.dat
Replace it with these lines:

Code: Select all

cfg__db_info__ndoutils__dbserver='localhost'
cfg__db_info__nagiosql__dbserver='localhost'
cfg__db_info__nagiosxi__dbserver='localhost'
- Then run the restore

- Since your production server backup had the DB offloaded you'll need to follow pages 14+ from the guide below to update your files to point from your offloaded DB server back to 'localhost' before it will work properly on the new system:

https://assets.nagios.com/downloads/nag ... Server.pdf

- Follow the After The Restore section from the backup/restore guide completely

- Since you're changing OS versions, run the restore_repair script from the backup/restore guide

https://assets.nagios.com/downloads/nag ... os-XI.pdf​

- If you need to re-IP, see here:

https://support.nagios.com/kb/article/c ... -549.html​

That's pretty much it. Please be aware of what a single XI license entitles you to:

https://support.nagios.com/kb/article.php?id=145​

Re: How to transfer Nagios XI to new server

Posted: Thu Dec 03, 2020 2:52 pm
by RyanMule
Hey ssax,

Thank you very much for this information!!! Very good to know about 7 vs 8. We will definitely be going back to 7 from the sounds of it.
I will provide an update once this is completed.

Thank you!
Ryan

Re: How to transfer Nagios XI to new server

Posted: Fri Dec 04, 2020 3:08 pm
by benjaminsmith
HI Ryan,

Good luck with migration! We'll keep this open until we hear back from you.

Best Regards,
Nagios Support Team

Re: How to transfer Nagios XI to new server

Posted: Wed Dec 16, 2020 3:56 pm
by grant.bakken
Follow up to Ryan's question- for installing an older version of NagiosXI, is there a document somewhere with information on where precisely to get them? I'm in a similar situation to his.

thanks

Grant

Re: How to transfer Nagios XI to new server

Posted: Wed Dec 16, 2020 4:38 pm
by benjaminsmith
Hi Grant,

You'll find download links for previous versions on the following page:

Nagios XI Previous Versions

Then follow the steps for a manual install.

Installing Nagios XI Manually on Linux

And replace the following two lines ( on page 3 ) with the specific download/version of XI.

Code: Select all

wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
Let us know how if you need anything else.
--Benjamin

Re: How to transfer Nagios XI to new server

Posted: Mon Jan 04, 2021 9:01 am
by RyanMule
Just wanted to say Thank you again for the support ssax! We we able to migrate to Centos 7 VMs and run the update to 5.7.5 XI following the steps you provided!

A couple checks broke for us but I figured that is normal with upgrading. Specifically VMware checks, working on fixing the plugin

Re: How to transfer Nagios XI to new server

Posted: Mon Jan 04, 2021 5:42 pm
by benjaminsmith
Hi,
Just wanted to say Thank you again for the support ssax! We we able to migrate to Centos 7 VMs and run the update to 5.7.5 XI following the steps you provided!
Great! Thanks for the update.

The VMware Wizard requires additional packages to be installed. The steps are covered in the following guide.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

If you hit any roadblocks, feel free to open a new support case ( forum or ticket ) for help.

Best Regards,
Benjamin