Don't know how to setup an openITCOCKPIT development system? Read our guide: Creating a openITCOCKPIT Development System
openITCOCKPIT uses a plugin-based system for checking the status of hosts and services. The Plugin API of openITCOCKPIT is 100% compatible to the Nagios, Naemon, Shinken and Icinga 1.x Plugin API. By default, openITCOCKPIT comes with a preset of standard plugins to check basic network features such as ports, running processes, cpu usage and so on.
In some cases, it can be handy to develop an own specialized plugin for a deep application monitoring.
Plugins for openITCOCKPIT can be written in any language. From a simple bash script to a complex Python or C binary – everything is possible. For some languages like Perl or Python there are even helper classes that make plugin development much faster and easier.
A plugin needs to fulfill at least the following requirements to be compatible with openITCOCKPIT.
The default set of plugins shipped with openITCOCKPIT is located at /opt/openitc/nagios/libexec.
It is recommended (but not necessary) to create a separate folder for custom plugins like /opt/openitc/my_checks/.
The underlying monitoring engine of openITCOCKPIT uses the provided return code (exit code) of a plugin to determine the state of a host or service.
By default the "Plugin output" has to be one line to STDOUT like in this example:
#!/bin/bash echo "This is the minimum plugin output" # Return with status UP or OK exit 0
openITCOCKPIT supports BBCode for styling or embedding hyperlinks in the plugin output.
echo "This os [b]bold text[/b]"
Performance data (metrics) gets used by openITCOCKPIT to create charts for the interface, notifications and Grafana.
Performance data gets separated from the plugin output by a pipe (|) character. It is optional if a plugin returns performance data or not.
The format of performance data is the following
|Example Plugin Output||Legend|
|PING OK - Packet loss = 0%, RTA = 17.30 ms|rta=17.302000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0|
If a plugin returns more than one output line, all other lines are saved as long plugin output.