Page 1 of 2
Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 10:57 am
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
Re: Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 11:42 am
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.
Re: Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 12:45 pm
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
Re: Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 1:56 pm
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
Re: Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 2:27 pm
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.
Re: Virtual Machine Upgrade Path
Posted: Tue Apr 12, 2016 2:40 pm
by hsmith
These instructions should help you move over your XI data:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Virtual Machine Upgrade Path
Posted: Wed Apr 13, 2016 7:39 am
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?
Re: Virtual Machine Upgrade Path
Posted: Wed Apr 13, 2016 4:58 pm
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.
Re: Virtual Machine Upgrade Path
Posted: Thu Apr 14, 2016 11:46 am
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?
Re: Virtual Machine Upgrade Path
Posted: Thu Apr 14, 2016 2:49 pm
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.