How to upgrade Nagios (Network Monitoring Tool) on Linux

We have already discussed about Nagios installation on RHEL based systems, Nagios installation on Debian based systems, Add Remote Linux Host to Nagios Server & Add Remote Windows Host to Nagios Server. Alternatively you can install other network monitoring tools such as Zabbix, Monitorix, Cacti, Munin & Icinga2.

Check other Monitoring Tools available for Linux

Nagios team proudly announce the latest version of Nagios 4.1.1 after 8 months of development on Augest 19, 2015. This release comes with 58 fixes. As we already know, Newer releases usually contain critical bug fixes & major updates, so its important to stay up to date. Here we are going to explain you about Nagios upgrade. This article applicable whoever done nagios installation using source code.

What’s new in Nagios 4.1.1

  • Fixed CGI’s not being able to read object configuration data when dependencies were present
  • Fix for exclude (!) not working for dependencies
  • Fixed memory overwrite issue in JSON string escaping
  • Update map-popup.html
  • 58 issue has been fixed on this release
  • 5 ENHANCEMENTS implemented
  • For more details about Nagios fixes

Make sure you have a good backup of your existing Nagios installation and configuration files before proceeding upgrade. If anything goes wrong or doesn’t work, it will allow you to rollback to old version.

nagios-upgrade-from4-0-8-to4-1-1-image-1

1) Nagios Upgrade

Follow the below simple steps to upgrade nagios to latest version.

[Stop Nagios Service]

[For SysVinit Systems]
# service nagios stop

[For systemd Systems]
# systemctl stop nagios.service

Navigate to /opt directory and download the latest available version of Nagios archive file, then extract it.

[Navigate to /opt directory]
# cd /opt

[Download latest version of nagios]
# wget http://sourceforge.net/projects/nagios/files/nagios-4.x/nagios-4.1.1/nagios-4.1.1.tar.gz

[Extract the archive file]
# tar -zxvf nagios-4.1.1.tar.gz

Navigate to nagios-4.x.x directory and run the Nagios configure script with Nagios command group finally run make install to complete the installation (Install updated binaries, documentation, and web web interface. Your existing configuration files will not be overwritten by this step).

[Navigate to nagios-4.1.1 directory]
# cd nagios-4.1.1

[Run the Nagios configure script]
# ./configure --with-command-group=nagcmd

[Compile the Nagios source code]
# make all

[Install updated binaries, documentation, and web web interface. Your existing configuration files will not be overwritten by this step]
# make install

[Verify your configuration file]
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Start Nagios & Restart Apache Web Server on SysVinit systems to check further.

# service nagios start
# service apache2 restart          [Debian/Mint/Ubuntu]
# service httpd restart            [RHEL/CentOS/Fedora]

Start Nagios & Restart Apache Web Server on systemd systems to check further.

# systemctl start nagios.service
# systemctl restart apache2.service          [Debian/Mint/Ubuntu]
# systemctl restart httpd.service            [RHEL/CentOS/Fedora]

That’s it, you have done for Nagios upgrade. See the below screenshot, i’m using latest version of Nagios Core 4.1.1
nagios-upgrade-from4-0-8-to4-1-1-image-2
Please stay tune with 2daygeek for Latest LINUX TIPS & GEEKS…)

Prakash Subramanian

Prakash Subramanian is a Linux lover and has 3.5+ years of experience in linux server administration with major Linux distribution such as (RHEL, CentOS, Ubuntu). He is currently working as a Senior L2 Linux Server administrator.

You may also like...