In the field of Networks and Servers there are great and efficient applications for System / Server Administrators (SysAdmins). Therefore, today we will talk about a well-known call Nagios Core.
Nagios Core it's basically the free version of Nagios. Which in turn is basically a popular equipment / services / network monitoring program in format open source.
And since we rarely address issues related to applications, programs and systems from the field of Networks and Servers or specific use for System / Server Administrators (SysAdmins), we will immediately leave below some links to some previous publications related to this IT field:
"Webmin is a web-accessible system configuration tool for OpenSolaris, GNU / Linux and other Unix systems. With it, you can configure internal aspects of many operating systems, such as users, space quotas, services, configuration files, shutdown of the computer, etc., as well as modify and control many free applications, such as the Apache web server, PHP, MySQL, DNS, Samba, DHCP, among others." Webmin: Administration from the web browser
Nagios Core: Free and free version of Nagios
What is Nagios Core?
According to the official website of Nagios, Nagios Core It is described as follows:
"Nagios® Core ™ is an open source network and system monitoring application. It watches over the hosts (computers) and services that you specify, alerting you when things go wrong and when they improve. Nagios Core was originally designed to work under Linux, although it should work under most other Unix-based Operating Systems as well. Also, it is the free version of our current tool called Nagios XI."
Features
Among the many features of Nagios Core the following 10 can be mentioned:
- Monitoring network services (SMTP, POP3, HTTP, NNTP, PING, among others.)
- Monitoring the resources of the different monitored hosts (Processor load, disk usage, among others.)
- A simple plugin design that allows users to easily develop their own service checks.
- Parallel service checks.
- The ability to define the network host hierarchy using "parent" hosts, allowing you to detect and distinguish between hosts that are down and those that are unreachable.
- Contact notifications when host or service issues occur and are resolved (by email, pager, or user-defined method).
- The ability to define event handlers to run during host or service events for proactive troubleshooting.
- Automatic rotation of log files.
- Support for implementing redundant monitoring hosts.
- An optional web interface to view the current status of the network, the history of notifications and problems, the log file, and more.
How to install it on Debian GNU / Linux 10?
Before starting this part, it is worth noting as usual that for this practical case we will use the usual Respin Linux called Miracles GNU / Linux, which is based on MX Linux 19 (Debian 10). Which has been built following our «Guide to Snapshot MX Linux».
However, any GNU / Linux Distro what support Systemd. Therefore, we will use this MX Linux Respin starting from GRUB boot system by your option with "Start with Systemd". Instead of its default option, which is without Systemd or rather with systemd-shim. Also, we will execute all the command commands from the Sysadmin user, instead of Root user, from said Respin Linux.
And now for your download, installation and use, we will use the «Quick Start Installation Guide for Debian« and these would be the command orders to execute in the terminal (console) of your Operating System:
1.- Steps to prepare the Operating System
Update Repositories and install essential and necessary packages to work with Nagios Core.
sudo apt update
sudo apt install autoconf gcc libc6 make wget unzip apache2 apache2-utils php libgd-dev
2.- Download the current software
cd /tmp
wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.6.tar.gz
tar xzf nagioscore.tar.gz
3.- Compile the current software
cd /tmp/nagioscore-nagios-4.4.6/
sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled
sudo make all
4.- Create Users and Groups
sudo make install-groups-users
sudo usermod -a -G nagios www-data
5.- Install various essential packages
sudo make install
sudo make install-daemoninit
sudo make install-commandmode
sudo make install-config
6.- Install Apache configuration files
sudo make install-webconf
sudo a2enmod rewrite
sudo a2enmod cgi
7.- Install and configure the Firewall via IPTables
sudo apt install iptables
sudo iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT
sudo apt install -y iptables-persistent
8.- Create User account in Apache to start in Nagios Core
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
9.- Restart / Start Necessary Services
systemctl restart apache2.service
systemctl start nagios.service
Note: Restart the Operating System in case of problems with these command commands.
10.- Login to Nagios Core
Run a Web Browser on the local machine if you have a Graphical User Environment (GUI) or on another computer on the Network. And in the address bar write any of the following command commands as you see fit:
http://127.0.0.1/nagios
http://localhost/nagios
http://nombreservidor.dominio/nagios
Note: If you do not see the "Nagios Core Login" window, check that your Operating System based on Debian GNU / Linux 8/9/10 has the correct configuration. "Document root" of the Apache server inside the following configuration file: /etc/apache2/apache2.conf
. Replace the path /var/www
by the following: /var/www/html
. Then restart the Apache Service or Computer, and try again on the computer.
Installing Nagios Core Plugins
Update Repositories and install essential and necessary packages to work with Nagios Plugins.
sudo apt update
sudo apt install autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext
Download and unzip the current package with the "Nagios Plugins"
cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
Compile and install the "Nagios Plugins"
cd /tmp/nagios-plugins-release-2.2.1/ ./tools/setup sudo ./configure sudo make sudo make install
Screen shots
For more information on Nagios Core the following links can be explored:
- Official site on GitHub
- Official documentation
- Resource Library
- Quick Start Installation Guides
- About Nagios Core
10 free and open alternatives
- Cacti
- Cabot
- Cockpit Project
- Icinga
- FreeMNS
- Munin
- netdata
- Pandora FMS
- PHP ServerMonitor
- Zabbix
To learn more about these alternatives and more, click on the following link: Equipment and Network Monitoring Software under Open Source.
Summary
In summary, as has been seen Nagios Core is a perfect software tool for the field of Networks / Servers and System / Server Administrators (SysAdmins). And it is not only powerful but flexible and adaptive, thanks to the use of its multiple plugins. And for those who might not use it, there are always great alternatives like Zabbix, Icinga and Cockpit Project, among many others.
We hope that this publication will be very useful for the entire «Comunidad de Software Libre y Código Abierto»
and of great contribution to the improvement, growth and diffusion of the ecosystem of applications available for «GNU/Linux»
. And do not stop sharing it with others, on your favorite websites, channels, groups or communities of social networks or messaging systems. Finally, visit our home page at «DesdeLinux» to explore more news, and join our official channel Telegram from DesdeLinux.