| |

How to Upgrade Nagios Core from 4.3.2 to 4.4.6

The new Nagios Core version fixes are here.

Nagios core 4.4.6 – 2020-04-28

FIXES

  • 1. Fixed Map display in Internet Explorer 11 (#714) (Scott Wilkerson)
  • 2. Fixed duplicate properties appearing in statusjson.cgi (#718) (Sebastian Wolf)
  • 3. Fixed NERD not building when enabled in ./configure (#723) (Sebastian Wolf)
  • 4. Fixed build process when using GCC 10 (#721) (Michael Orlitzky)
  • 5. Fixed postauth vulnerabilities in histogram.js, map.js, trends.js (CVE-2020-1408) (Thanks UraSec Team) (Sebastian Wolf)
  • 6. When using systemd, configuration will be verified before reloading (#715) (tatref)
  • 7. Fixed HARD OK states triggering on the maximum check attempt (#757) (Sebastian Wolf)

Nagios version history details.

Follow below steps to upgrade your nagios monitoring to latest version.

Step 1: First and most important step is take your nagios configuration backup before proceed.

# cp -r /usr/local/nagios /usr/local/nagios4.3_20102020
# cp -r /etc/nagios /etc/nagios4.3
# cp -r /etc/nagios-plugins /etc/nagios-plugins.old

In my case, I also take backup of my plugins folder.

Step 2: Stop nagios service

# service nagios stop
or
# systemctl stop nagios

Step 3: Now download latest version file from nagios official website.

# wget https://sourceforge.net/projects/nagios/files/nagios-4.x/nagios-4.4.6/nagios-4.4.6.tar.gz

Step 4: Extract downloaded file and change directory.

# tar xzf nagios-4.4.6.tar.gz
# cd nagios-4.4.6/

Step 5: compile and install nagios with below commands.

# ./configure --with-httpd-conf=/etc/apache2/sites-enabled
# make all
# make install
# make install-init
# make install-commandmode
# make install-config
# make install-webconfig

Step 6: Now you can check latest version is installed and all your old configuration are vanished. To check that start nagios service.

# service nagios start
or
# systemctl start nagios

Step 7: Now restore your backup configuration.

# cp -Rpv /usr/local/nagios4.3_20102020/etc/* /usr/local/nagios/etc/
# cp -v /usr/local/nagios4.3_20102020/libexec/* /usr/local/nagios/libexec/

Step 8: Restart nagios service to monitor with new version. You may also need to reload daemon to effect with new version.

# systemctl daemon-reload
# service nagios restart
or
# systemctl restart nagios

You can also check any configuration errors before restarting service with this command.

root@nagios-server:~# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL
Website: https://www.nagios.org
Reading configuration data…
Read main config file okay…
Read object config files okay…
Running pre-flight check on configuration data…
Checking objects…
Checked 1213 services.
Checked 147 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 5 contacts.
Checked 4 contact groups.
Checked 36 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths…
Checked 147 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check

That’s it. You are successfully upgraded nagios core to new version.

Similar Posts