electrical power and nominal frequencies added,
Message-ID: <52161ce0.bYRAt628fRlgiEoQ%gg(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: ddf93493d40eef6a52ee043d66b28b47135bfea3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ddf93493d40eef…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Thu Aug 22 16:12:21 2013 +0200
Rules for temperatures, voltage, electrical power and nominal frequencies added,
partly to enable non-european customers to set meaningful levels different from
the european defaults
---
checks/liebert_bat_temp | 2 +-
checks/ups_in_freq | 1 +
checks/ups_in_voltage | 1 +
checks/ups_out_voltage | 1 +
checks/ups_power | 2 +-
web/plugins/wato/check_parameters.py | 74 ++++++++++++++++++++++++++++++++--
6 files changed, 76 insertions(+), 5 deletions(-)
diff --git a/checks/liebert_bat_temp b/checks/liebert_bat_temp
index 06389e6..b51cdc5 100644
--- a/checks/liebert_bat_temp
+++ b/checks/liebert_bat_temp
@@ -54,7 +54,7 @@ check_info['liebert_bat_temp'] = {
"check_function" : check_liebert_bat_temp,
"service_description" : "Battery Temp",
"has_perfdata" : True,
- "group" : "hw_temperature",
+ "group" : "hw_single_temperature",
"snmp_info" : (".1.3.6.1.4.1.476.1.42.3.4.1.3.3.1.3",
"1"),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[".1.3.6.1.4.1.476.1.42"]
diff --git a/checks/ups_in_freq b/checks/ups_in_freq
index 12e6af8..6cd615d 100644
--- a/checks/ups_in_freq
+++ b/checks/ups_in_freq
@@ -55,6 +55,7 @@ check_info['ups_in_freq'] = {
"check_function" : check_ups_in_freq,
"service_description" : "IN frequenz phase %s",
"has_perfdata" : True,
+ "group" : "efreq",
"snmp_info" : ( ".1.3.6.1.2.1.33.1.3.3.1", [ 0, 2 ] ),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1", ".1.3.6.1.4.1.818.1.100.1.1",
diff --git a/checks/ups_in_voltage b/checks/ups_in_voltage
index 6800576..09fc295 100644
--- a/checks/ups_in_voltage
+++ b/checks/ups_in_voltage
@@ -54,6 +54,7 @@ check_info['ups_in_voltage'] = {
"check_function" : check_ups_in_voltage,
"service_description" : "IN voltage phase %s",
"has_perfdata" : True,
+ "group" : "evolt",
"snmp_info" : ( ".1.3.6.1.2.1.33.1.3.3.1", [ 0, 3 ] ),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1", ".1.3.6.1.4.1.818.1.100.1.1",
diff --git a/checks/ups_out_voltage b/checks/ups_out_voltage
index fa74095..871c5c1 100644
--- a/checks/ups_out_voltage
+++ b/checks/ups_out_voltage
@@ -54,6 +54,7 @@ check_info['ups_out_voltage'] = {
"check_function" : check_ups_out_voltage,
"service_description" : "OUT voltage phase %s",
"has_perfdata" : True,
+ "group" : "evolt",
"snmp_info" : ( ".1.3.6.1.2.1.33.1.4.4.1", [ 0, 2 ] ),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1", ".1.3.6.1.4.1.818.1.100.1.1",
diff --git a/checks/ups_power b/checks/ups_power
index aebd56c..b64ed82 100644
--- a/checks/ups_power
+++ b/checks/ups_power
@@ -57,7 +57,7 @@ check_info['ups_power'] = {
"check_function" : check_ups_power,
"service_description" : "Power phase %s",
"has_perfdata" : True,
- "group" : "hw_temperature",
+ "group" : "epower",
"snmp_info" : ( ".1.3.6.1.2.1.33.1.4.4.1", [ 0, 4 ] ),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.534.1",
".1.3.6.1.4.1.705.1", ".1.3.6.1.4.1.818.1.100.1.1",
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index bcf0b2a..467ee10 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -37,7 +37,7 @@ subgroup_networking = _("Networking")
subgroup_storage = _("Storage, Filesystems and Files")
subgroup_os = _("Operating System Resources")
subgroup_printing = _("Printers")
-subgroup_environment = _("Temperature, Humidity, etc.")
+subgroup_environment = _("Temperature, Humidity, Electrical Parameters,
etc.")
subgroup_applications = _("Applications, Processes & Services")
subgroup_virt = _("Virtualization")
subgroup_hardware = _("Hardware, BIOS")
@@ -2753,7 +2753,73 @@ register_check_parameters(
]),
TextAscii(
title = _("Sensor ID"),
- help = _("The identificator of the themal sensor.")),
+ help = _("The identifier of the themal sensor.")),
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
+ "hw_single_temperature",
+ _("Host/Device temperature"),
+ Tuple(
+ help = _("Temperature levels for hardware devices with "
+ "a single temperature sensor."),
+ elements = [
+ Integer(title = _("warning if above"), unit = u"°C",
default_value = 35),
+ Integer(title = _("critical if above"), unit = u"°C",
default_value = 40),
+ ]),
+ None,
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
+ "evolt",
+ _("Nominal Voltages"),
+ Tuple(
+ help = _("Voltage Levels for devices like UPS oder PDUs. "
+ "Several phases may be addressed independently."),
+ elements = [
+ Integer(title = _("warning if below"), unit = "V",
default_value = 210),
+ Integer(title = _("critical if below"), unit = "V",
default_value = 180),
+ ]),
+ TextAscii(
+ title = _("Phase"),
+ help = _("The identifier of the phase the power is related to.")),
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
+ "efreq",
+ _("Nominal Frequencies"),
+ Tuple(
+ help = _("Levels for the nominal frequencies of AC devices "
+ "like UPSs or PDUs. Several phases may be addressed
independently."),
+ elements = [
+ Integer(title = _("warning if below"), unit = "Hz",
default_value = 40),
+ Integer(title = _("critical if below"), unit = "Hz",
default_value = 45),
+ ]),
+ TextAscii(
+ title = _("Phase"),
+ help = _("The identifier of the phase the power is related to.")),
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
+ "epower",
+ _("Electrical Power"),
+ Tuple(
+ help = _("Levels for the electrical power consumption of a device "
+ "like a UPS or a PDU. Several phases may be addressed
independently."),
+ elements = [
+ Integer(title = _("warning if below"), unit = "Watt",
default_value = 20),
+ Integer(title = _("critical if below"), unit = "Watt",
default_value = 1),
+ ]),
+ TextAscii(
+ title = _("Phase"),
+ help = _("The identifier of the phase the power is related to.")),
"first"
)
@@ -2763,7 +2829,9 @@ register_check_parameters(
_("Hardware temperature (e.g. switches)"),
Tuple(
help = _("Temperature levels for hardware devices like "
- "Brocade switches."),
+ "Brocade switches with (potentially) several "
+ "temperature sensors. Sensor IDs can be selected "
+ "in the rule."),
elements = [
Integer(title = _("warning if above"), unit = u"°C",
default_value = 35),
Integer(title = _("critical if above"), unit = u"°C",
default_value = 40),