Nagios Core: What is Nagios and how to install it on Debian GNU / Linux?

Nagios Core: What is Nagios and how to install it on Debian GNU / Linux?

Nagios Core: What is Nagios and how to install it on Debian GNU / Linux?

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.

Webmin: administration from the web browser

Webmin: Administration from the web browser

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

Related article:
Webmin: administration from the web browser

Related article:
Webmin: administration from the web browser
Related article:
TurnKey Linux: The Virtual Device Library

Nagios Core: Free and free version of Nagios

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:

  1. Monitoring network services (SMTP, POP3, HTTP, NNTP, PING, among others.)
  2. Monitoring the resources of the different monitored hosts (Processor load, disk usage, among others.)
  3. A simple plugin design that allows users to easily develop their own service checks.
  4. Parallel service checks.
  5. 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.
  6. Contact notifications when host or service issues occur and are resolved (by email, pager, or user-defined method).
  7. The ability to define event handlers to run during host or service events for proactive troubleshooting.
  8. Automatic rotation of log files.
  9. Support for implementing redundant monitoring hosts.
  10. 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 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

Nagios Core: Screenshot 1

Nagios Core: Screenshot 2

Nagios Core: Screenshot 3

Nagios Core: Screenshot 4

Nagios Core: Screenshot 5

Nagios Core: Screenshot 6

Nagios Core: Screenshot 7

Nagios Core: Screenshot 8

Nagios Core: Screenshot 9

Nagios Core: Screenshot 10

Nagios Core: Screenshot 11

Nagios Core: Screenshot 12

Nagios Core: Screenshot 13

Nagios Core: Screenshot 14

Nagios Core: Screenshot 15

Nagios Core: Screenshot 16

Nagios Core: Screenshot 17

Nagios Core: Screenshot 1

Nagios Core: Screenshot 19

Nagios Core: Screenshot 20

Nagios Core: Screenshot 21

Nagios Core: Screenshot 22

Nagios Core: Screenshot 23

Nagios Core: Screenshot 24

Nagios Core: Screenshot 25

For more information on Nagios Core the following links can be explored:

10 free and open alternatives

  1. Cacti
  2. Cabot
  3. Cockpit Project
  4. Icinga
  5. FreeMNS
  6. Munin
  7. netdata
  8. Pandora FMS
  9. PHP ServerMonitor
  10. Zabbix

To learn more about these alternatives and more, click on the following link: Equipment and Network Monitoring Software under Open Source.

Summary: Various publications

Your Order

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 «FromLinux» to explore more news, and join our official channel Telegram from DesdeLinux.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.