How to update to latest Nagios version

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

How to update to latest Nagios version

Post by caterpillartce »

Hello,

I noticed there is a new Nagios update from the web interface. and there is a green button to "Upgrade to latest version". Since this will be our first time upgrade, I am hesitate to just click on that button. Is that the way to upgrade Nagios - clicking on that button? Does it backup the existing install automatically in the upgrade process? If not, what kind of manual backup are you recommending before I click on that button? Below shows what we have and what the new version is, in case that makes a difference.

Latest Available Version: 5.4.4
Installed Version: 5.2.9
Last Update Check: 05/16/2017 06:49:01


Thanks!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: How to update to latest Nagios version

Post by dwhitfield »

caterpillartce wrote: Is that the way to upgrade Nagios
Well, it's *a* way. I usually suggest people use https://assets.nagios.com/downloads/nag ... nstall.pdf

As you can see at https://assets.nagios.com/downloads/nag ... Web-UI.pdf, the web version does do a backup first.
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to update to latest Nagios version

Post by caterpillartce »

Despite of your wise suggestion for us to upgrade manually, I decided to use the web interface since I am not familiar with Linux and the web interface is not something new so I expect it to work fine... but, it got stuck and there has not been any status message after ~20 minutes. When I looked at the tmp directory I do not see install file downloaded. Instead there is a file named 1785 in /tmp/hsperfdata_nagios with just 32KB in size but the date stamp seems to be changing while size is not growing... Not even sure if that is upgrade related.

And there is not a button to cancel.

I know internet works fine as the "check for updates" worked fine just prior to the upgrade.

What should I do now? I will do it manually if that is the way to go, but how do we cancel the upgrade that was already started from web interface? I do not want the two to collide.

Thanks!
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to update to latest Nagios version

Post by tgriep »

When you do an upgrade of XI using the Web interface, it does not use the /tmp folder to download and install the new version of XI, it uses the following folder instead.

Code: Select all

/usr/local/nagiosxi/tmp/
In that folder, there should be and upgrade.log file, can you post that file so we can see any errors on why the system did not finish the upgrade?
Be sure to check out our Knowledgebase for helpful articles and solutions!
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to update to latest Nagios version

Post by caterpillartce »

there is no upgrade.log file in that directory.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to update to latest Nagios version

Post by tgriep »

That is strange that the log file is not there. To stop the web upgrade, run the following command as root on the Nagios server. It is one long command.

Code: Select all

[ $(grep -c mysql /usr/local/nagiosxi/html/config.inc.php) -eq  "2" ] && echo "update xi_commands set status_code = '2' where command = '1120';" | psql nagiosxi nagiosxi || echo "update xi_commands set status_code = '2' where command = '1120';" | mysql -uroot -pnagiosxi nagiosxi
Log out of the XI GUI, log back in and check that the upgrade is not running anymore.

Then, I suggest doing the manual upgrade and see if that works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to update to latest Nagios version

Post by caterpillartce »

Thank you! That did cancel the upgrade from web.

I then tried to do it manually and ran into a problem right away. We do have a proxy server and I configured it in Nagios, but when doing the upgrade manually, how do I tell it to go through the proxy server? Also, if it makes things easier, can I download the install file in my Windows IE and then put it on the Nagios server /tmp?

[root@nagiosservername myid]# cd /tmp
[root@nagiosservername tmp]# rm -rf nagiosxi xi*.tar.gz
[root@nagiosservername tmp]# wget https://assets.nagios.com/downloads/nag ... est.tar.gz
--2017-06-16 13:21:02-- https://assets.nagios.com/downloads/nag ... est.tar.gz
Resolving assets.nagios.com... 72.14.181.71, 2600:3c00::f03c:91ff:fedf:b821
Connecting to assets.nagios.com|72.14.181.71|:443... failed: Connection timed out.
Connecting to assets.nagios.com|2600:3c00::f03c:91ff:fedf:b821|:443... failed: Network is unreachable.
[root@nagiosservername tmp]#


Thanks!
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to update to latest Nagios version

Post by caterpillartce »

I should have google'd first... got it working to download with -e https_proxy=... in wget

now moving on to install... hope all works!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to update to latest Nagios version

Post by cdienger »

Keep us posted : )
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: How to update to latest Nagios version

Post by caterpillartce »

yes it finished successfully!

Thanks for the help!
Locked