Virtual Machine Upgrade Path

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sm00thindian
Posts: 10
Joined: Thu Dec 18, 2014 1:27 pm

Virtual Machine Upgrade Path

Post by sm00thindian »

My company chose to use the Nagios XI virtual appliance we are running 5.2.5 and would like to upgrade to the latest version. The reason we chose the appliance is because our systems have NO access to repos so normal install and maintenance like on a RedHat or CentOS system will not work for us. I'm assuming that If we perform a backup through the interface and backup our certificates and other items external to Nagios that we can apply the new Virtual Appliance to our hardware and then do a restore and that will work.

-Kilynn
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Virtual Machine Upgrade Path

Post by lmiltchev »

This won't work as the restore script will...well, restore to "5.2.5" version. You can restore your old XI instance to a "new" one if you use the same XI version, OS/architecture, etc.

How large is your install? Do you have many xi users set up? With a relatively small install, you could spin a new 5.2.7 VM, then import your configs manually. This has some disadvantages - it's time consuming, contacts will be imported but not "xi users", so you will need to recreate them, etc.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sm00thindian
Posts: 10
Joined: Thu Dec 18, 2014 1:27 pm

Re: Virtual Machine Upgrade Path

Post by sm00thindian »

How large is your install? -
New - 84 checks.. 5 servers

Do you have many xi users set up? -
4

With a relatively small install, you could spin a new 2.5.7 VM, then import your configs manually. -
We will need to be able to spin up the new VM and import our history and support configs

This has some disadvantages - it's time consuming, contacts will be imported but not "xi users", so you will need to recreate them, etc. -
No doubt 'xi users' are in the MySQL db right? We're using LDAP authentication
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Virtual Machine Upgrade Path

Post by jomann »

Yes, LDAP and AD users are still created in the DB like they would be if they were local users - so if you wanted to keep them you'd need to copy over the DB also.

If it's just a matter of upgrading from 5.2.5 -> 5.2.7, that could most likely be performed by downloading the tarball and running the ./upgrade script since we are NOT installing any new software from any repos for the 5.2.7 version. This won't always work though, if the upgrade requires a new package to be installed. You may also want to check out the offline install... Just know that you will be slightly behind in released versions doing it via offline installs. https://assets.nagios.com/downloads/nag ... onment.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sm00thindian
Posts: 10
Joined: Thu Dec 18, 2014 1:27 pm

Re: Virtual Machine Upgrade Path

Post by sm00thindian »

The offline suffers the same problem, it requires that you update packages. Which is our entire reason for using the VM. Can you map out manual restoration steps if we spin up new VM and want to move our data to it please.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Virtual Machine Upgrade Path

Post by hsmith »

These instructions should help you move over your XI data: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios Employee.
me.
sm00thindian
Posts: 10
Joined: Thu Dec 18, 2014 1:27 pm

Re: Virtual Machine Upgrade Path

Post by sm00thindian »

In the beginning of this post I was told that doing a backup and restore would restore an the previous version. So, if what you are telling me is true I will be able to:

1. Perform a backup
2. Offload backup
3. Offload ssl certs and configs
4. Spin up new VM version
5. Change MySQL and root passwords as appropriate
6. Run a restore
7. Reapply SSL certs and configs

True?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Virtual Machine Upgrade Path

Post by ssax »

Not true, here's what should work for you.

*** Make sure that you have known-good backups/vm snapshots before making any modifications just in case!

Download this file and transfer it to the /tmp directory of your XI server:

https://assets.nagios.com/downloads/nag ... 2.7.tar.gz

Then run these commands:

Code: Select all

rm -rf /tmp/nagiosxi
tar zxf xi-5.2.7.tar.gz
cd /tmp/nagiosxi
touch installed.repos
touch installed.prereqs
./upgrade
Let it do its thing until it completes or dies, as long as it says "UPGRADE COMPLETED!", you should be good to go.
sm00thindian
Posts: 10
Joined: Thu Dec 18, 2014 1:27 pm

Re: Virtual Machine Upgrade Path

Post by sm00thindian »

I tested this today and I was successful in my upgrade for this minor version. However, I am certain this is not supportable long term. I'm back to my question then, how do I move my content from the previous version when I spin up the latest VM?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Virtual Machine Upgrade Path

Post by ssax »

There's not really an easy path like that for the source install, you would essentially have to do a Core migration:

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

Then transfer over your /etc/mrtg/conf.d files and your /usr/local/nagios/share/perfdata files and for any modified files you would need to re-implement the changes (like nagios.cfg, don't replace, there may be new things that need to be in there that were'nt in the old one).

I'd schedule a change request to move the XI server into a zone that has internet/repo access just to perform the updates and then move it back, it would make your life a lot easier. If that's not an option and you don't have local repositories (so that you can do an offline install on a new server, migrate to it, and just do offline upgrades the whole time), then a migration would be required every time.
Locked