icinga2/doc/2.2-setting-up-check-plugin...

54 lines
2.4 KiB
Markdown
Raw Normal View History

2013-10-02 09:50:26 +02:00
## Setting up Check Plugins
On its own Icinga 2 does not know how to check external services. The
[Monitoring Plugins Project](https://www.monitoring-plugins.org/) (former
Nagios Plugins) provides an extensive set of plugins which can be used by
Icinga 2 to check whether services are working properly.
The recommended way of installing these standard plugins is to use your
distribution's package manager.
> **Note**
>
> The `Nagios Plugins` project was renamed to `Monitoring Plugins` project
> in Jan 2014. Therefore package names may still reflect the old name.
For your convenience here is a list of package names for some of the more
popular operating systems/distributions:
2013-10-10 12:32:50 +02:00
OS/Distribution | Package Name | Installation Path
-----------------------|--------------------|---------------------------
RHEL/CentOS (EPEL) | nagios-plugins-all | /usr/lib/nagios/plugins or /usr/lib64/nagios/plugins
Debian | nagios-plugins | /usr/lib/nagios/plugins
FreeBSD | nagios-plugins | /usr/local/libexec/nagios
OS X (MacPorts) | nagios-plugins | /opt/local/libexec
Depending on which directory your plugins are installed into you may need to
2013-10-07 09:35:44 +02:00
update the `plugindir` macro in your Icinga 2 configuration. This macro is used
by the service templates contained in the Icinga Template Library to determine
2013-10-10 12:32:50 +02:00
where to find the plugin binaries.
2013-10-18 20:05:08 +02:00
### Integrate Additonal Plugins
You may require a custom check plugin not provided by the official Nagios plugins.
All existing Nagios or Icinga 1.x plugins found on public community websites
will work with Icinga 2 as well.
* [MonitoringExchange](https://www.monitoringexchange.org)
* [Icinga Wiki](https://wiki.icinga.org)
2013-10-18 20:05:08 +02:00
Once you have downloaded the plugin copy them into the directory defined by the global
`IcingaMacro` `$plugindir$` and make sure that the user the Icinga daemon is running as
can execute the the plugin binary. Plugins should provide the `--help` parameter
providing details how they must get called in your command definition later on.
# cp check_snmp_int.pl /usr/local/icinga/libexec/
# chmod +x /usr/local/icinga/libexec/check_snmp_int.pl
# /usr/local/icinga/libexec/check_snmp_int.pl --help
> **Note**
>
> You may require additional libraries for scripts. Please consult the installation
> documentation and/or README for their installation requirements.