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?
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..
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:
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..
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:
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.