Custom Nagios plugins

Custom Nagios plugins

Custom Nagios plugins


Nagios is a well-known monitoring framework; it’s also known for its plugins, the software components that are actually providing monitoring capabilities.

IPHost allows using Nagios plugins directly; we have detailed instructions on setting up and using Nagios plugins; below is the essence of these instructions.

Plugins can be anything executable – native application, a script file (including Unix shell files or Windows PowerShell scripts) and so on. There are simple development guidelines: one can easily create a script or program that can be compatible with any Nagios installation just by following the guidelines.

Cygwin environment

Cygwin is popular Windows port of Unix-like utilities; compatible with most modern Windows versions, it allows using Unix-like environment under Windows. We provide detailed instructions on setting up Cygwin version of Nagios plugins. The installation is idempotent; all you can do when corresponding Cygwin components are updated is to repeat the installation, to continue using the same plugins.

You can use any Cygwin-built executable, or script, as Nagios plugin – provided it follows the corresponding guidelines (see above).

Windows Subsystem for Linux

Starting with Windows 10 (version 1607) and matching Windows Server 2019, the “built-in” Linux environment can be used instead. It provides typical Linux set of commands to install/upgrade pieces of software.

We provide instructions and monitor definition examples for running WSL-based Nagios plugins. Although Ubuntu is used as an example, any supported Linux distribution will do.

WSL, in general, provides simpler environment to create new Nagios plugins, and can be accessed via both command-line (“Script or Program” monitor) and by secure shell connection (“SSH Script or Program”). Note that latte roption allows, in general, running Nagios plugins installed on remote Windows systems.

External Nagios host

Typically, Nagios can be run and accessed from any OS type. Similarly, “Script or Program”/”SSH Script or Program” monitor types can be used. Please follow the corresponding OS’ guidelines on installing/building Nagios plugins.

Writing custom plugins

When in need of creating a custom monitor, you can consider using Nagios plugins interface for it. That way, you will easily integrate the custom script or program into existing monitoring environment. If you needed to replace it later, you would only have to replace it with a different plugin, as long as they both conform to corresponding calling standard.

Do you need assistance writing or setting up your own Nagios plugin within IPHost? Please let us know.