From: BarbUk Date: Wed, 28 Nov 2018 12:55:23 +0000 (+0400) Subject: Add lsyncd CheckCommand definition X-Git-Tag: v2.11.0-rc1~270^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b0bfd51bfaed69144dea09244fc7b563957ac40;p=icinga2 Add lsyncd CheckCommand definition --- diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 103410d2d..ecedc252f 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2975,6 +2975,23 @@ nwc_health_oids | **Optional.** A list of oids which are downloaded and writte nwc_health_offline | **Optional.** The maximum number of seconds since the last update of cache file before it is considered too old. nwc_health_multiline | **Optional.** Multiline output +### Network Services + +This category contains plugins which receive details about network services + +#### lsyncd + +The [check_lsyncd](https://github.com/ohitz/check_lsyncd) plugin, +uses the `lsyncd` status file to monitor [lsyncd](https://axkibe.github.io/lsyncd/). + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +------------------------|--------------------------------------------------------------------------- +lsyncd_statfile | **Optional.** Set status file path (default: /var/run/lsyncd.status). +lsyncd_warning | **Optional.** Warning if more than N delays (default: 10). +lsyncd_critical | **Optional.** Critical if more then N delays (default: 100). + ### Operating System diff --git a/itl/plugins-contrib.d/network-services.conf b/itl/plugins-contrib.d/network-services.conf index 0e1420d5b..5126dcc69 100644 --- a/itl/plugins-contrib.d/network-services.conf +++ b/itl/plugins-contrib.d/network-services.conf @@ -81,3 +81,23 @@ object CheckCommand "rbl" { vars.rbl_warning = 1 vars.rbl_critical = 1 } + +object CheckCommand "lsyncd" { + import "plugin-check-command" + command = [ PluginDir + "/check_lsyncd" ] + + arguments = { + "-s" = { + value = "$lsyncd_statfile$" + description = "Set status file path (default: /var/run/lsyncd.status)." + } + "-w" = { + value = "$lsyncd_warning$" + description = "Warning if more than N delays (default: 10)." + } + "-c" = { + value = "$lsyncd_critical$" + description = "Critical if more then N delays (default: 100)." + } + } +}