+3 votes
225 views
in Tools by (242k points)
reopened
Plugins for Nagios: the fundamental modules of network monitoring software

1 Answer

+4 votes
by (1.6m points)
edited
 
Best answer

What are Nagios plugins really about?
What types of plugins for Nagios can be found?
How to install and configure plugins for Nagios

image

Plugins for Nagios: the fundamental modules of network monitoring software

In our digital guide you can obtain information about the multiple possibilities of using Nagios, a high-performance application for network monitoring. It addresses the role played by official plugins without which the supervision of networks with Nagios would not be possible. Now, exactly how important is this plugin pack and the various third-party extensions ? How can its installation be carried out?

What are Nagios plugins really about?

Unlike other monitoring programs, Nagios does not have its own mechanism to check the status of systems and network services, rather it is the applications, that is, the plugins for Nagios, that perform this task. Regarding the extensions, also called modules, it can be said that they are already compiled files written in C or C ++ or executable scripts (Perl, PHP, etc.), which contain arguments in the command lines that start the check. and transmit the results to the software in charge of monitoring. However, Nagios takes care of it itself when the status of the service or host in question needs to be monitored.

As a consequence, plugins act as an abstraction layer between the monitoring logic, which can be viewed in the Nagios interface, and the services and hosts that will be monitored. The advantage of this architecture is that it enables Nagios to monitor everything for which an automatic review can be scheduled. However, the monitoring tool is not able to understand the characteristics of the network components it inspects or how each of the controls are carried out, which explains why Nagios cannot function without plugins..

What types of plugins for Nagios can be found?

The freedom that exists when programming a plugin for Nagios means that extensions for various devices, programs, system processes, protocols and other services are developed and further developed. In this way we can talk about plugins for:

  • HTTP, POP3, IMAP, FTP, SSH, DHCP
  • CPU, Hard Drive and Memory Usage, Active Users
  • Operating systems such as Windows, Linux or Unix distributions
  • Router, switches
  • Log files

In principle, it is necessary to differentiate the aforementioned Nagios plugins from those developed by members of the Nagios community. The official package It comprises around 500 standard plugins, covering a large number of the major network reviews, as well as different essential libraries for many of the third-party modules. The manufacturer is the one who takes care of the maintenance of the collection, so that all the extensions are always updated. On the contrary, the community is not always dedicated to the development of plugins, so in some cases these may not be compatible with the Nagios Core version or with the network components examined.

Before looking for specific plugins in the Nagios Exchange directory, you need to download the official plugin package from the manufacturer's website. If you have the necessary knowledge, you also have the possibility of programming your own plugin for Nagios. To find out what are the factors that you will have to take into account for this, take a look at the official guidelines..

How to install and configure plugins for Nagios

If you have already decided on a plugin and downloaded it, now you must install and configure it. Next, we show you what are the most important steps for its installation and configuration in Ubuntu.

1. Access the download directory and unzip the file you have downloaded. The command line interfaces of the official plugin package look like this:

  cd ~/download tar xzf nagios-plugins-2.1.2.tar.gz  

2. Next, go to the unzipped folder:

  cd nagios-plugins-2.1.2  

3. This is about compiling and installing the plugins. This can be done with the lines that appear below:

  ./configure --with-nagios-user=nagios --with-nagios-group=Nagios make make install  

4. Now go to the Nagios XI web interface and open the administration section. In the menu bar that appears on the left you will find the option? System Extensions? and in it the section? Manage Plugins ?, where you can link the extensions installed with the Nagios software. Click the button? Browse? and select the desired Nagios plugin. If you resort to? Upload Plugin ?, you can implement it and it will appear included in the list of available modules.

5. It may be useful to check whether the plugins that have been implemented actually work and carry out the required checks. To do this, it is not necessary to put the monitoring software into operation, since the extensions can be executed through the command line . In this sense, it is enough to open the plugin directory as usual, that is, / usr / local / nagios / libexec, and test the modules with the appropriate commands. To know each plugin and the possible parameters, it is recommended, for example, to open the help menu ( -h ). 

  cd /usr/local/nagios/libexec ./name_des_plugins -h  

6. With the help of the knowledge about the possible arguments of the command lines, once the plugin has loaded you can define the instructions for the Nagios software . To do this, go to the section? Configure? from the menu and choose the options? Core Config Manager? and? Commands ?. Next, click on? Add New ?, after which an input screen will open for a new Nagios instruction that is specified like this:

  • Command name : at this point the name of the instruction is defined, which should be as informative as possible, such as the name of the corresponding plugin for Nagios.  

  • Command line : this section indicates the plugin and the corresponding command line interface. The macro $ USER1 $ operates as a wildcard for the plugin directory and $ ARG1 $ is set as a possible argument on the command line.

  • Command type : select the option? Check command? in case the plugin has to examine a host or a service or? misc command? when an event has to be monitored. If you are not sure what type of component it is, select the "unclassified" option.  

  • Active : the Nagios instruction is activated if this option is checked.

  • Available plugins : This drop-down menu provides an overview of the plugins that are available.

Save your Nagios command using the? Save? and confirm it later in the general menu by clicking on the button? Apply Configuration ?. Thus, the appropriate extension, together with a Nagios instruction, is available and can be used for the corresponding monitoring tasks, so that you can create hosts, services or events and assign them to the plugin.  


...