From: BarbUk Date: Sat, 22 Dec 2018 07:19:18 +0000 (+0400) Subject: Add hddtemp CheckCommand definition X-Git-Tag: v2.11.0-rc1~263^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e2449716b37f369527e7e11b792f13acee32524;p=icinga2 Add hddtemp CheckCommand definition --- diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index e8f48ab28..04d28af81 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2579,6 +2579,34 @@ openmanage_timeout | **Optional.** Plugin timeout in seconds [default=30] openmanage_vdisk_critical | **Optional.** Make any alerts on virtual disks critical openmanage_warning | **Optional.** Custom temperature warning limits +#### hddtemp + +The [check_hddtemp](https://github.com/vint21h/nagios-check-hddtemp) plugin, +uses the `hddtemp` binary to monitor hard drive temperature. + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +------------------------|---------------------------------------------------------------------------------- +hddtemp_server | **Required.** server name or address +hddtemp_port | **Optional.** port number +hddtemp_devices | **Optional.** comma separated devices list, or empty for all devices in hddtemp response +hddtemp_separator | **Optional.** hddtemp separator +hddtemp_warning | **Required.** warning temperature +hddtemp_critical | **Required.** critical temperature +hddtemp_timeout | **Optional.** receiving data from hddtemp operation network timeout +hddtemp_performance | **Optional.** If set, return performance data +hddtemp_quiet | **Optional.** If set, be quiet + +The following sane default value are specified: +``` +vars.hddtemp_server = "127.0.0.1" +vars.hddtemp_warning = 55 +vars.hddtemp_critical = 60 +vars.hddtemp_performance = true +vars.hddtemp_timeout = 5 +``` + #### adaptec-raid The [check_adaptec_raid](https://github.com/thomas-krenn/check_adaptec_raid) plugin diff --git a/itl/plugins-contrib.d/hardware.conf b/itl/plugins-contrib.d/hardware.conf index e88b611d2..3a5fefeac 100644 --- a/itl/plugins-contrib.d/hardware.conf +++ b/itl/plugins-contrib.d/hardware.conf @@ -204,3 +204,56 @@ object CheckCommand "openmanage" { } } } + +object CheckCommand "hddtemp" { + import "plugin-check-command" + command = [ PluginDir + "/check_hddtemp" ] + + arguments = { + "--server" = { + value = "$hddtemp_server$" + description = "server name or address" + required = true + } + "--port" = { + value = "$hddtemp_port$" + description = "port number" + } + "--devices" = { + value = "$hddtemp_devices$" + description = "comma separated devices list, or empty for all devices in hddtemp response" + } + "--separator" = { + value = "$hddtemp_separator$" + description = "hddtemp separator" + } + "--warning" = { + value = "$hddtemp_warning$" + description = "warning temperature" + required = true + } + "--critical" = { + value = "$hddtemp_critical$" + description = "critical temperature" + required = true + } + "--timeout" = { + value = "$hddtemp_timeout$" + description = "receiving data from hddtemp operation network timeout" + } + "--performance-data" = { + set_if = "$hddtemp_performance$" + description = "return performance data" + } + "--quiet" = { + set_if = "$hddtemp_quiet$" + description = "be quiet" + } + } + + vars.hddtemp_server = "127.0.0.1" + vars.hddtemp_warning = 55 + vars.hddtemp_critical = 60 + vars.hddtemp_performance = true + vars.hddtemp_timeout = 5 +}