17
Dec/09
2

Nagios Plugins

The Nagios core does not perform check of hosts or services on it’s own. Instead of that it calls small scripts or programs to gather the status of the configured hosts or services. These scripts or programs are called Nagios Plugins.

Nagios Plugins are small scripts or programs which are called with special parameters. A Nagios Plugins can output a string as status output and additionally some performance data. The Nagios Plugins als need to return a valid exit code. Nagios uses this exit code to gathers the status of a configured host or service. Depending on the exit code Nagios fires actions like notifications or eventhandlers. The output is only for giving more information to the users. The performance data is for creating graphs from the current object state.

Due to the modularity at the check level it is possible to monitor nearly every system which is connected to the network.

Nearly all programming languages can be used for creating plugins by design. A very common language for creating Nagios Plugins is Perl. It is also possible to create compiled plugins e.g. using C or C++ which run a lot faster in most cases. Surely the scripted Nagios Plugins have the advantage that they can be customized easily.

The most plugins are written for active checking remote systems from the Nagios host. There are other ways to check the state of remote systems. For example it is possible to use passive checks using NSCA or execute the remote checks on the monitored systems using NRPE. This are just two examples, there are many other ways.

Official Nagios Plugins

There exists a collection of official Nagios Plugins which can be found on Nagiosplugins.org. This collection of Nagios Plugins is maintained by a dedicated team of developers. These plugins typically have a high quality level.

Nagios Plugin Guidelines

There are not very much restrictions what valid Nagios Plugins need to do. The most important document for creating valid Nagios Plugins is the Nagios plug-in development guidelines.

3rd Party Plugins

There are a lot of different, good and not so good plugins out there. In some cases, e.g. in the case of measuring traffic of network interfaces there are a lot of different plugins available which all have their advantages and disadvantages. Having such a big choice it is a real problem to find the best plugin for a concrete usecase. Often it takes some time to find the right plugin which matches all the needs.

To give the users a central point for searching for Nagios Plugins several plugin directories have been created. One of the first was Nagios Exchange which is now called Monitoring Exchange. Since some time there is an official central repository for Nagios extensions on the official Nagios page also called Nagios Exchange.

The Nagios Plugin directories are a step in the the right direction but they don’t fix the problem that all Nagios Administrators need to find the best plugin for their needs. At the moment there are no documentations about “best practices” for the different plugins to choose. So it might save some time to ask the community for some hints about best practices in case of choosing good plugins.

Filed under: Nagios
Comments (2) Trackbacks (0)
  1. Stefan RahnNo Gravatar
    09:57 on June 24th, 2010

    Hallo Herr Michelsen Ich bin auf der Suche nach einem Nagios PlugIn für HP Server zum Überwachen des Raid Systems. Können Sie mir weiterhelfen ? Mit bestem Dank im Voraus Stefan Rahn

  2. LaMiNo Gravatar
    19:35 on June 24th, 2010

    Eine Antwort ist per Mail unterwegs.

    Viele Grüße, Lars Michelsen

No trackbacks yet.