Nagios is an application that monitors systems, networks, and infrastructure and it offers monitoring and alerting services for servers, switches, applications, and services. It alerts users when things go wrong and inform them a second time when the problem has been resolved. Ethan Galstad and a group of developers originally wrote Nagios as NetSaint and its first release in 1999. Nagios is a recursive acronym from Nagios Ain’t Gonna Insist On Sainthood. Sainthood refers to the original name NetSaint, which changed in response to a legal challenge by owners of a similar trademark. Agios (or hagios) also transliterates the Greek word άγιος, which means a saint.
Please note that Nagios has two versions: the free version and the Enterprise version called Nagios XI. This article will explain how to install Nagios-free release, but we do not install Nagios manually because it will spend time and effort. We will install Nagios by running a bash script originally created by Yogesh Pancal and can run on RedHat family and ubuntu server. But the script can only install Nagios version 3 and Nagios plugin version 1.4. So, I do ngoprek for this script so the script can install the newest version of Nagios automatically. If there are issues when installing the latest version of Nagios and Nagios plugin, then this script will install Nagios version 4.3.4 and Nagios plugin version 2.2.1 on your server.
The script can only run by using the root user and make sure disable the firewall application and SELinux first so that the installation runs smoothly. Make sure also that the server can connect to the internet connection. This script has been tested using CentOS 6 and 7, Ubuntu 16 and 17, Debian 9 and openSUSE Leap. You can download the script at this link.
After that, follow the following commands:
If no problem, Nagios will be installed properly on the server as in the picture below:
If you want to uninstall Nagios application, you can use the script. And follow the commands to execute the script: