Page 1 of 1

Upgrade from 5.2.9 to Latest

Posted: Thu May 27, 2021 12:40 am
by xx101
Hello,

I was looking for an article/KB for an upgrade path/matrix for NagiosXI Servers but can't find one.
Is it possible to upgrade directly from 5.2.9 to the latest version? If not, can this be updated to 5.7.5 the least? Since this I think a safe version to mitigate the 13 Vulnerabilities reported..

Looking forward to your response.


Thank you in advance!

Re: Upgrade from 5.2.9 to Latest

Posted: Thu May 27, 2021 9:56 am
by dchurch
It should be possible to update directly from Nagios XI 5.2.x to 5.8.3.

See Nagios XI Upgrade Instructions

However, there are some gotchas surrounding upgrading which I've seen:
  • Nagios XI used to use PostgreSQL for its database, whereas Nagios Core always used MySQL. Nowadays the product is MySQL-only by default. The software tends to work better if you migrate the PostgreSQL database into MySQL. See Converting PostgreSQL to MySQL for Nagios XI. The upgrade process won't attempt to do this for you.
  • ndo2db, (sometimes called the Database Backend) is no longer needed in newer (>=5.7.0) versions of Nagios XI. ndo2db is our older technology that basically listens on a UNIX socket for database inserts, then handles the actual insertion into the database. It has limits, being that it runs into issues when it tries to insert more than the database can handle. In newer versions (Nagios XI 5.7.0 and later), this was replaced by just writing directly to the database from the Nagios worker threads. In addition to being able to handle more database inserts, this resulted in an overall performance boost, too. ndo2db should be automatically replaced during the upgrade.
Read on if you're migrating servers or updating your Linux distro (e.g. CentOS 6 -> CentOS 7)

As far as migrating goes, the simplest solution is probably to deploy the new server with Nagios XI installed (simplest way is probably to install using a package manager - instructions here: https://repo.nagios.com/). Then export the configuration from the old machine, and import them into the new one following these steps:

Re: Upgrade from 5.2.9 to Latest

Posted: Fri May 28, 2021 9:05 am
by xx101
Hello!

So I did try the direct upgrade after the postgresql conversion, when I ran the offline upgrade, I encountered this error:
[root@centos nagiosxi]# ./upgrade
package nagiosxi-shellinabox is not installed
Loaded plugins: fastestmirror
Examining nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm: nagiosxi-shellinabox-5.8.3-1.el7.x86_64
Marking nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nagiosxi-shellinabox.x86_64 0:5.8.3-1.el7 will be installed
--> Processing Conflict: nagiosxi-shellinabox-5.8.3-1.el7.x86_64 conflicts nagiosxi-deps-el7
Loading mirror speeds from cached hostfile
* base: centos.nethub.com.hk
* epel: ftp.iij.ad.jp
* extras: centos.nethub.com.hk
* updates: mirror.hostlink.com.hk
--> Processing Conflict: nagiosxi-shellinabox-5.8.3-1.el7.x86_64 conflicts shellinabox
--> Finished Dependency Resolution
Error: nagiosxi-shellinabox conflicts with shellinabox-2.20-5.el7.x86_64
Error: nagiosxi-shellinabox conflicts with nagiosxi-deps-el7-5.8.3-1.noarch
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

I did both try connecting it to internet and not, and both have the same error..

Re: Upgrade from 5.2.9 to Latest

Posted: Fri May 28, 2021 9:14 am
by xx101
I also tried this one, which I saw in one of the forums:
yum remove snmptt shellinabox

then re-try the upgrade, it proceeds to install, here's the result:
[root@centos nagiosxi]# sh ./upgrade
package nagiosxi-shellinabox is not installed
Loaded plugins: fastestmirror
Examining nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm: nagiosxi-shellinabox-5.8.3-1.el7.x86_64
Marking nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nagiosxi-shellinabox.x86_64 0:5.8.3-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
nagiosxi-shellinabox x86_64 5.8.3-1.el7 /nagiosxi-shellinabox-5.8.3-1.el7.x86_64 494 k

Transaction Summary
====================================================================================================================================
Install 1 Package

Total size: 494 k
Installed size: 494 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : nagiosxi-shellinabox-5.8.3-1.el7.x86_64 1/1
Created symlink from /etc/systemd/system/multi-user.target.wants/shellinaboxd.service to /usr/lib/systemd/system/shellinaboxd.service.
Verifying : nagiosxi-shellinabox-5.8.3-1.el7.x86_64 1/1

Installed:
nagiosxi-shellinabox.x86_64 0:5.8.3-1.el7

Complete!
package nagiosxi-nxti is not installed
Loaded plugins: fastestmirror
Examining nagiosxi-nxti-5.8.3-1.el7.x86_64.rpm: nagiosxi-nxti-5.8.3-1.el7.x86_64
Marking nagiosxi-nxti-5.8.3-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nagiosxi-nxti.x86_64 0:5.8.3-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
nagiosxi-nxti x86_64 5.8.3-1.el7 /nagiosxi-nxti-5.8.3-1.el7.x86_64 297 k

Transaction Summary
====================================================================================================================================
Install 1 Package

Total size: 297 k
Installed size: 297 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : nagiosxi-nxti-5.8.3-1.el7.x86_64 1/1
Created symlink from /etc/systemd/system/multi-user.target.wants/snmptt.service to /usr/lib/systemd/system/snmptt.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/snmptrapd.service to /usr/lib/systemd/system/snmptrapd.service.
Verifying : nagiosxi-nxti-5.8.3-1.el7.x86_64 1/1

Installed:
nagiosxi-nxti.x86_64 0:5.8.3-1.el7

Complete!
package perl-Nagios-Monitoring-Plugin is not installed
Loaded plugins: fastestmirror
Examining perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch.rpm: perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch
Marking perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package perl-Nagios-Monitoring-Plugin.noarch 0:0.51-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
perl-Nagios-Monitoring-Plugin noarch 0.51-1.el7 /perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch 115 k

Transaction Summary
====================================================================================================================================
Install 1 Package

Total size: 115 k
Installed size: 115 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch 1/1
Verifying : perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch 1/1

Installed:
perl-Nagios-Monitoring-Plugin.noarch 0:0.51-1.el7

Complete!
Loaded plugins: fastestmirror
Examining fping-3.10-4.el7.x86_64.rpm: fping-3.10-4.el7.x86_64
fping-3.10-4.el7.x86_64.rpm: does not update installed package.
Examining freetds-0.95.81-1.el7.x86_64.rpm: freetds-0.95.81-1.el7.x86_64
freetds-0.95.81-1.el7.x86_64.rpm: does not update installed package.
Examining jwhois-4.0-38.el7.x86_64.rpm: jwhois-4.0-38.el7.x86_64
jwhois-4.0-38.el7.x86_64.rpm: does not update installed package.
Examining libc-client-2007f-16.el7.x86_64.rpm: libc-client-2007f-16.el7.x86_64
libc-client-2007f-16.el7.x86_64.rpm: does not update installed package.
Examining libidn2-2.0.4-4.el7.x86_64.rpm: libidn2-2.0.4-4.el7.x86_64
libidn2-2.0.4-4.el7.x86_64.rpm: does not update installed package.
Examining libmcrypt-2.5.8-13.el7.x86_64.rpm: libmcrypt-2.5.8-13.el7.x86_64
libmcrypt-2.5.8-13.el7.x86_64.rpm: does not update installed package.
Examining nagiosxi-5.8.3-1.el7.x86_64.rpm: nagiosxi-5.8.3-1.el7.x86_64
Package nagiosxi not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-mrtg-5.8.3-1.el7.x86_64.rpm: nagiosxi-mrtg-5.8.3-1.el7.x86_64
Package nagiosxi-mrtg not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nagioscore-5.8.3-1.el7.x86_64.rpm: nagiosxi-nagioscore-5.8.3-1.el7.x86_64
Package nagiosxi-nagioscore not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nagiosplugins-5.8.3-1.el7.x86_64.rpm: nagiosxi-nagiosplugins-5.8.3-1.el7.x86_64
Package nagiosxi-nagiosplugins not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nagvis-5.8.3-1.el7.x86_64.rpm: nagiosxi-nagvis-5.8.3-1.el7.x86_64
Package nagiosxi-nagvis not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-ndoutils-5.8.3-1.el7.x86_64.rpm: nagiosxi-ndoutils-5.8.3-1.el7.x86_64
Package nagiosxi-ndoutils not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nrds-5.8.3-1.el7.x86_64.rpm: nagiosxi-nrds-5.8.3-1.el7.x86_64
Package nagiosxi-nrds not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nrpe-5.8.3-1.el7.x86_64.rpm: nagiosxi-nrpe-5.8.3-1.el7.x86_64
Package nagiosxi-nrpe not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nsca-5.8.3-1.el7.x86_64.rpm: nagiosxi-nsca-5.8.3-1.el7.x86_64
Package nagiosxi-nsca not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-nxti-5.8.3-1.el7.x86_64.rpm: nagiosxi-nxti-5.8.3-1.el7.x86_64
nagiosxi-nxti-5.8.3-1.el7.x86_64.rpm: does not update installed package.
Examining nagiosxi-pnp-5.8.3-1.el7.x86_64.rpm: nagiosxi-pnp-5.8.3-1.el7.x86_64
Package nagiosxi-pnp not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm: nagiosxi-shellinabox-5.8.3-1.el7.x86_64
nagiosxi-shellinabox-5.8.3-1.el7.x86_64.rpm: does not update installed package.
Examining nagiosxi-wkhtmltox-5.8.3-1.el7.x86_64.rpm: nagiosxi-wkhtmltox-5.8.3-1.el7.x86_64
Package nagiosxi-wkhtmltox not installed, cannot update it. Run yum install to install it instead.
Examining nagiosxi-wmic-5.8.3-1.el7.x86_64.rpm: nagiosxi-wmic-5.8.3-1.el7.x86_64
Package nagiosxi-wmic not installed, cannot update it. Run yum install to install it instead.
Examining nmap-6.47-2.x86_64.rpm: 2:nmap-6.47-2.x86_64
nmap-6.47-2.x86_64.rpm: does not update installed package.
Examining perl-Class-Accessor-0.34-12.el7.noarch.rpm: perl-Class-Accessor-0.34-12.el7.noarch
perl-Class-Accessor-0.34-12.el7.noarch.rpm: does not update installed package.
Examining perl-Config-IniFiles-2.79-1.el7.noarch.rpm: perl-Config-IniFiles-2.79-1.el7.noarch
perl-Config-IniFiles-2.79-1.el7.noarch.rpm: does not update installed package.
Examining perl-Crypt-Rijndael-1.12-1.el7.x86_64.rpm: perl-Crypt-Rijndael-1.12-1.el7.x86_64
perl-Crypt-Rijndael-1.12-1.el7.x86_64.rpm: does not update installed package.
Examining perl-Mail-IMAPClient-3.37-1.el7.noarch.rpm: perl-Mail-IMAPClient-3.37-1.el7.noarch
perl-Mail-IMAPClient-3.37-1.el7.noarch.rpm: does not update installed package.
Examining perl-Mail-POP3Client-2.19-5.el7.noarch.rpm: perl-Mail-POP3Client-2.19-5.el7.noarch
Package perl-Mail-POP3Client not installed, cannot update it. Run yum install to install it instead.
Examining perl-Math-Calc-Units-1.07-9.el7.noarch.rpm: perl-Math-Calc-Units-1.07-9.el7.noarch
perl-Math-Calc-Units-1.07-9.el7.noarch.rpm: does not update installed package.
Examining perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch.rpm: perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch
perl-Nagios-Monitoring-Plugin-0.51-1.el7.noarch.rpm: does not update installed package.
Examining perl-Net-SMTP-TLS-0.12-1.el7.noarch.rpm: perl-Net-SMTP-TLS-0.12-1.of.el7.noarch
Package perl-Net-SMTP-TLS not installed, cannot update it. Run yum install to install it instead.
Examining perl-Net-SNMP-6.0.1-7.el7.noarch.rpm: perl-Net-SNMP-6.0.1-7.el7.noarch
perl-Net-SNMP-6.0.1-7.el7.noarch.rpm: does not update installed package.
Examining perl-Number-Format-1.73-14.el7.noarch.rpm: perl-Number-Format-1.73-14.el7.noarch
perl-Number-Format-1.73-14.el7.noarch.rpm: does not update installed package.
Examining php-imap-5.4.16-7.el7.x86_64.rpm: php-imap-5.4.16-7.el7.x86_64
php-imap-5.4.16-7.el7.x86_64.rpm: does not update installed package.
Examining php-mcrypt-5.4.16-7.el7.x86_64.rpm: php-mcrypt-5.4.16-7.el7.x86_64
php-mcrypt-5.4.16-7.el7.x86_64.rpm: does not update installed package.
Examining php-mssql-5.4.16-7.el7.x86_64.rpm: php-mssql-5.4.16-7.el7.x86_64
php-mssql-5.4.16-7.el7.x86_64.rpm: does not update installed package.
Examining php-pear-HTML-Template-IT-1.3.0-2.el5.noarch.rpm: php-pear-HTML-Template-IT-1.3.0-2.el5.noarch
php-pear-HTML-Template-IT-1.3.0-2.el5.noarch.rpm: does not update installed package.
Examining php-pecl-ssh2-0.12-1.el7.x86_64.rpm: php-pecl-ssh2-0.12-1.el7.x86_64
php-pecl-ssh2-0.12-1.el7.x86_64.rpm: does not update installed package.
Examining python-bson-2.5.2-4.el7.x86_64.rpm: python-bson-2.5.2-4.el7.x86_64
python-bson-2.5.2-4.el7.x86_64.rpm: does not update installed package.
Examining python-pymongo-2.5.2-4.el7.x86_64.rpm: python-pymongo-2.5.2-4.el7.x86_64
python-pymongo-2.5.2-4.el7.x86_64.rpm: does not update installed package.
Examining python-pymssql-2.1.1-1.el7.x86_64.rpm: python-pymssql-2.1.1-1.el7.x86_64
Cannot install package python-pymssql-2.1.1-1.el7.x86_64. It is obsoleted by installed package python2-pymssql-2.1.4-1.el7.x86_64
Examining python-simplejson-3.3.3-1.el7.x86_64.rpm: python-simplejson-3.3.3-1.el7.x86_64
Cannot install package python-simplejson-3.3.3-1.el7.x86_64. It is obsoleted by installed package python2-simplejson-3.10.0-2.el7.x86_64
Examining rrdtool-1.4.9-1.el7.x86_64.rpm: rrdtool-1.4.9-1.el7.x86_64
rrdtool-1.4.9-1.el7.x86_64.rpm: does not update installed package.
Examining rrdtool-devel-1.4.9-1.el7.x86_64.rpm: rrdtool-devel-1.4.9-1.el7.x86_64
Package rrdtool-devel not installed, cannot update it. Run yum install to install it instead.
Examining rrdtool-perl-1.4.9-1.el7.x86_64.rpm: rrdtool-perl-1.4.9-1.el7.x86_64
rrdtool-perl-1.4.9-1.el7.x86_64.rpm: does not update installed package.
Examining rrdtool-python-1.4.9-1.el7.x86_64.rpm: rrdtool-python-1.4.9-1.el7.x86_64
rrdtool-python-1.4.9-1.el7.x86_64.rpm: does not update installed package.
Nothing to do


I didn't see the 'Upgrade Complete'
I'm following this:
https://assets.nagios.com/downloads/nag ... onment.pdf

Re: Upgrade from 5.2.9 to Latest

Posted: Fri May 28, 2021 9:20 am
by xx101
I grepped all the one that has error. Should I install this individually using yum?

[root@centos nagiosxi]# bash upgrade | grep error
Package nagiosxi not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-mrtg not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nagioscore not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nagiosplugins not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nagvis not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-ndoutils not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nrds not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nrpe not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-nsca not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-pnp not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-wkhtmltox not installed, cannot update it. Run yum install to install it instead.
Package nagiosxi-wmic not installed, cannot update it. Run yum install to install it instead.
Package perl-Mail-POP3Client not installed, cannot update it. Run yum install to install it instead.
Package perl-Net-SMTP-TLS not installed, cannot update it. Run yum install to install it instead.
Cannot install package python-pymssql-2.1.1-1.el7.x86_64. It is obsoleted by installed package python2-pymssql-2.1.4-1.el7.x86_64
Cannot install package python-simplejson-3.3.3-1.el7.x86_64. It is obsoleted by installed package python2-simplejson-3.10.0-2.el7.x86_64
Package rrdtool-devel not installed, cannot update it. Run yum install to install it instead.

then I'll re-run the ./upgrade?

Re: Upgrade from 5.2.9 to Latest

Posted: Fri May 28, 2021 3:23 pm
by dchurch
To be truthful the offline upgrade process only works under certain conditions. This is because the offline upgrade process only works on the list of installed packages.

If the server was set up using the package repository (online or offline), then the offline upgrade will work.

If it was installed manually from source, the offline upgrade won't work very well.

The OVA files are built from an install-from-source, though I'm not sure why.

Manually-installed servers are best upgraded using the web interface (when connected to the internet), or downloading and running https://assets.nagios.com/downloads/nagiosxi/upgrade.sh. See this document

Re: Upgrade from 5.2.9 to Latest

Posted: Sat May 29, 2021 2:41 am
by xx101
Thank you for the input!
I was wondering how the upgrade process is? Does the script upgrade the version per Major version? or directly to the latest version of nagiosxi?

The last time I did an upgrade it took me atleast 3 hrs+ and still not finished.. Is that expected?

also, I am unsure but I am seeing errors like this...
"CHECKING FOR INSTALL SCRIPT '/usr/local/nagiosxi/html/includes/configwizards/windowseventlog/install.sh'...
INSTALL SCRIPT DOES NOT EXIST.
CMD: . /usr/local/nagiosxi/var/xi-sys.cfg && chown -R $nagiosuser /usr/local/nagiosxi/html/includes/configwizards/windowseventlog"

Im now unsure if it just goes on loop...

Re: Upgrade from 5.2.9 to Latest

Posted: Tue Jun 01, 2021 12:49 pm
by dchurch
Is there a file on your system, /usr/local/nagiosxi/tmp/configwizards_api_versions.xml? If so, what are the contents?