From 375a0344363249f9d8f7364d3058e91628329cd2 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Sat, 22 Dec 2018 10:43:35 +0400 Subject: [PATCH 1/2] Add temp CheckCommand definition --- doc/10-icinga-template-library.md | 13 +++++++++++++ itl/plugins-contrib.d/hardware.conf | 25 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index e8f48ab28..76e287a9e 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2579,6 +2579,19 @@ 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 +#### temp + +The [check_temp](https://github.com/jackbenny/check_temp) plugin, +uses the `lm-sensors` binary to monitor temperature sensors. + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +------------------------|---------------------------------------------------------------------------------- +temp_warning | **Required.** Exit with WARNING status if above INTEGER degrees +temp_critical | **Required.** Exit with CRITICAL status if above INTEGER degrees +temp_sensor | **Optional.** Set what to monitor, for example CPU or MB (or M/B). Check sensors for the correct word. Default is CPU. + #### 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..53455a242 100644 --- a/itl/plugins-contrib.d/hardware.conf +++ b/itl/plugins-contrib.d/hardware.conf @@ -204,3 +204,28 @@ object CheckCommand "openmanage" { } } } + +object CheckCommand "temp" { + command = [ PluginDir + "/check_temp" ] + + arguments = { + "-w" = { + value = "$temp_warning$" + description = "Exit with WARNING status if above INTEGER degrees" + required = true + } + "-c" = { + value = "$temp_critical$" + description = "Exit with CRITICAL status if above INTEGER degrees" + required = true + } + "--sensor" = { + value = "$temp_sensor$" + description = "Set what to monitor, for example CPU or MB (or M/B). Check sensors for the correct word. Default is CPU." + } + } + + vars.temp_warning = "75" + vars.temp_critical = "80" + vars.temp_sensor = "Core" +} From 1c3c01f17b17a06c55611f636caaae18075b25f6 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Sun, 23 Dec 2018 18:26:24 +0400 Subject: [PATCH 2/2] Rename check_temp to check_lmsensors --- doc/10-icinga-template-library.md | 10 +++++----- itl/plugins-contrib.d/hardware.conf | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index f0b4da694..b7b2cee09 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2601,18 +2601,18 @@ 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 -#### temp +#### lmsensors -The [check_temp](https://github.com/jackbenny/check_temp) plugin, +The [check_lmsensors](https://github.com/jackbenny/check_temp) plugin, uses the `lm-sensors` binary to monitor temperature sensors. Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): Name | Description ------------------------|---------------------------------------------------------------------------------- -temp_warning | **Required.** Exit with WARNING status if above INTEGER degrees -temp_critical | **Required.** Exit with CRITICAL status if above INTEGER degrees -temp_sensor | **Optional.** Set what to monitor, for example CPU or MB (or M/B). Check sensors for the correct word. Default is CPU. +lmsensors_warning | **Required.** Exit with WARNING status if above INTEGER degrees +lmsensors_critical | **Required.** Exit with CRITICAL status if above INTEGER degrees +lmsensors_sensor | **Optional.** Set what to monitor, for example CPU or MB (or M/B). Check sensors for the correct word. Default is CPU. #### hddtemp diff --git a/itl/plugins-contrib.d/hardware.conf b/itl/plugins-contrib.d/hardware.conf index 46ce83604..29d7b91b5 100644 --- a/itl/plugins-contrib.d/hardware.conf +++ b/itl/plugins-contrib.d/hardware.conf @@ -205,29 +205,29 @@ object CheckCommand "openmanage" { } } -object CheckCommand "temp" { - command = [ PluginDir + "/check_temp" ] +object CheckCommand "lmsensors" { + command = [ PluginDir + "/check_lmsensors" ] arguments = { "-w" = { - value = "$temp_warning$" + value = "$lmsensors_warning$" description = "Exit with WARNING status if above INTEGER degrees" required = true } "-c" = { - value = "$temp_critical$" + value = "$lmsensors_critical$" description = "Exit with CRITICAL status if above INTEGER degrees" required = true } "--sensor" = { - value = "$temp_sensor$" + value = "$lmsensors_sensor$" description = "Set what to monitor, for example CPU or MB (or M/B). Check sensors for the correct word. Default is CPU." } } - vars.temp_warning = "75" - vars.temp_critical = "80" - vars.temp_sensor = "Core" + vars.lmsensors_warning = "75" + vars.lmsensors_critical = "80" + vars.lmsensors_sensor = "Core" } object CheckCommand "hddtemp" {