Nagios Tutorial for Beginners: What is, Installation, Architecture

What is Continuous Monitoring?

Continuous monitoring is a process to detect, report, respond all the attacks which occur in its infrastructure. Once the application is deployed into the server, the role of continuous monitoring comes in to play. The entire process is all about taking care of the company's infrastructure and respond appropriately.

In this Nagios tutorial, you will learn:

What is Nagios?

Nagios is an open source software for continuous monitoring of systems, networks, and infrastructures. It runs plugins stored on a server which is connected with a host or another server on your network or the Internet. In case of any failure, Nagios alerts about the issues so that the technical team can perform recovery process immediately.

Nagios is used for continuous monitoring of systems, applications, service and business process in a DevOps culture.

Why We Need Nagios tool?

Here, are the important reasons to use Nagios monitoring tool:

History of Nagios

1996-Ethan Galstad uses the ideas and architecture of his earlier work to begin building a new application which runs under Linux OS

1999-The plugins that were which were originally distributed as a part of the NetSaint distribution are soon as a separate Nagios Plugins project

2002- Ethan renames the project to "Nagios" because of trademark issues with the name "NetSaint."

2005- Nagios becomes SourceForge.net Project of the Month in June

2009-Nagios Enterprises releases its first commercial version, Nagios XI

2012-Nagios again renamed as Nagios Core

2016-Nagios core surpasses 7,500,000 downloads directly from SourceForge.net website

Features of Nagios

Following are the important features of Nagios monitoring tool:

Nagios Architecture

Nagios is a client-server architecture. Usually, on a network, a Nagios server is running on a host, and plugins are running on all the remote hosts which should be monitored.

Nagios Architecture

Nagios Architecture

  1. The scheduler is a component of server part of Nagios. It sends a signal to execute the plugins at the remote host.
  2. The plugin gets the status from the remote host
  3. The plugin sends the data to the process scheduler
  4. The process scheduler updates the GUI and notifications are sent to admins

Plugins:

Nagios plugins provide low-level intelligence on how to monitor anything and everything with Nagios Core. Plugins operate acts as a standalone application, but they are designed to be executed by Nagios Core. It connects to Apache that is controlled by CGI to display the result. Moreover, a database connected to Nagios to keep a log file.

How do plugins work?

Consider the above example-

Likewise, NRPE(Nagios Remote plug-in Executor) and NSCA plugins are used to monitor Linux and Mac OS X respectively.

GUI:

An interface of Nagios is used to display in web pages generated by CGI. It can be buttons to green or red, sound, graph, etc.

When the soft alert is raised many times, a hard alert is raised, then the Nagios server sends a notification to the administrator.

Nagios GUI

Install Nagios tool at AWS

Step 1) Got to https://aws.amazon.com/marketplace/pp/B0773T3529 and click Continue to Subscribe

Step 2) Accept Terms

Step 3) You will see subscription pending message

Step 4) Refresh the same page after a few minutes and click "Continue to Configuration

Step 5) Keep the settings default and click Continue to Launch

Step 6) Review the settings. Create a new Key and click launch

Step 7) Note the public DNS of your instance

Step 8) In your windows machine, use the tool putty generator to convert pem file to ppk

Step 9) In putty, enter the public DNS

Step 10) In Auth section, enter the ppk key and click open

Step 11) In terminal,

  1. Enter login name as ubuntu
  2. Run this command sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
  3. Enter a new password of your choice

Step 12) In your browser, Go to location http://<Public DNS>/nagios3 in my case http://ec2-54-209-48-136.compute-1.amazonaws.com/nagios3/.

Enter Username: nagiosadmin

pass: set in the previous step

Step 13) Nagios Loads

Application of Nagios

Nagios application monitoring tool is a health check & monitoring system for a typical Data Centre, comprises all type of equipment's such as:

Disadvantages of Using Nagios

Summary

 

YOU MIGHT LIKE: