Module: check_mk
Branch: master
Commit: 6544d6a5f5474bbb79e48ad2c93fae87c92313c8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6544d6a5f5474b…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Fri Sep 27 22:49:34 2013 +0200
check apc_symmetra_power can now be configured in WATO, check man pages
adopted for apc_symmetra_power and apc_symmetra_ext_temp
---
checkman/apc_symmetra_ext_temp | 5 +++--
checkman/apc_symmetra_power | 8 +++++---
checks/apc_symmetra_ext_temp | 5 -----
checks/apc_symmetra_power | 5 +++--
checks/apc_symmetra_test | 2 +-
checks/ups_test | 2 +-
web/plugins/wato/check_parameters.py | 27 +++++++++++++++++++++++++++
7 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/checkman/apc_symmetra_ext_temp b/checkman/apc_symmetra_ext_temp
index 0303c59..35b7699 100644
--- a/checkman/apc_symmetra_ext_temp
+++ b/checkman/apc_symmetra_ext_temp
@@ -4,8 +4,9 @@ catalog: hw/environment
license: GPL
distribution: check_mk
description:
- This check polls the state of temperature sensors
- attached to a APC Symmetra UPS.
+ This check polls the state of external temperature sensors
+ attached to a APC Symmetra UPS. The check is in the group "room_temperature"
+ and can this be configured in WATO with the "Room Temperature" rule.
item:
The index of the sensor, e.g. {"1"}.
diff --git a/checkman/apc_symmetra_power b/checkman/apc_symmetra_power
index 97896cc..01b04c1 100644
--- a/checkman/apc_symmetra_power
+++ b/checkman/apc_symmetra_power
@@ -4,11 +4,13 @@ catalog: hw/power
license: GPL
distribution: check_mk
description:
- This checks just monitors the output power (in Watt) of the
+ This check monitors the output power (in Watt) of the
(usually three) phases of an APC Symmetra power supply.
You can define warning and critical levels of power, below which
- the phases must not drop. Each phase is realized as a separate
- check.
+ the phases must not drop.
+
+item:
+ The index of the phase, e.g. {"1"}.
examples:
# Trigger warning/critical level if power drops below 100 or 20 Watt
diff --git a/checks/apc_symmetra_ext_temp b/checks/apc_symmetra_ext_temp
index bcc9a9d..a75aacb 100644
--- a/checks/apc_symmetra_ext_temp
+++ b/checks/apc_symmetra_ext_temp
@@ -45,11 +45,6 @@ def check_temp(item, params, info):
return (0, infotxt, perfdata)
return (3, "Sensor not found in SNMP data")
-
-
-
-
-
check_info["apc_symmetra_ext_temp"] = {
'check_function': check_temp,
'inventory_function': inventory_temp,
diff --git a/checks/apc_symmetra_power b/checks/apc_symmetra_power
index 60ff68f..fbe2370 100644
--- a/checks/apc_symmetra_power
+++ b/checks/apc_symmetra_power
@@ -38,9 +38,9 @@ def check_apc_power(item, params, info):
infotext = "current power: %d W, warn/crit at and below %d/%d W" %
\
(power, warn, crit)
- if power != -1 and power <= crit:
+ if power != -1 and power < crit:
return (2, infotext, perfdata)
- elif power != -1 and power <= warn:
+ elif power != -1 and power < warn:
return (1, infotext, perfdata)
else:
return (0, infotext, perfdata)
@@ -53,6 +53,7 @@ check_info["apc_symmetra_power"] = {
'inventory_function': inventory_apc_power,
'service_description': 'Power phase %s',
'has_perfdata': True,
+ 'group': 'apc_power',
'snmp_info': ('.1.3.6.1.4.1.318.1.1.1.9.3.3.1',
['2.1.1', '7.1.1']),
'snmp_scan_function': lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3"),
}
diff --git a/checks/apc_symmetra_test b/checks/apc_symmetra_test
index c3e26fc..3b18dca 100644
--- a/checks/apc_symmetra_test
+++ b/checks/apc_symmetra_test
@@ -103,7 +103,7 @@ def inventory_apc_test(info):
check_info['apc_symmetra_test'] = {
"inventory_function" : inventory_apc_test,
"check_function" : check_apc_test,
- "service_description" : "APC Self Test",
+ "service_description" : "Self Test",
"has_perfdata" : False,
"group" : "ups_test",
"snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3"),
diff --git a/checks/ups_test b/checks/ups_test
index e68a847..f08c89b 100644
--- a/checks/ups_test
+++ b/checks/ups_test
@@ -128,7 +128,7 @@ def check_ups_test(item, params, info):
check_info['ups_test'] = {
"inventory_function" : inventory_ups_test,
"check_function" : check_ups_test,
- "service_description" : "UPS Self Test",
+ "service_description" : "Self Test",
"has_perfdata" : False,
"group" : "ups_test",
"snmp_info" : ( ".1.3.6.1.2.1.33.1.7", [3,5,6,4 ] ),
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 20a7f35..7822068 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -729,6 +729,33 @@ register_check_parameters(
)
register_check_parameters(
+ subgroup_environment,
+ "apc_power",
+ _("APC Power Consumption"),
+ Tuple(
+ title = _("Power Comsumption of APC Devices"),
+ elements = [
+ Integer(
+ title = _("Warning below"),
+ unit = _("W"),
+ default_value = 20,
+ ),
+ Integer(
+ title = _("Critical below"),
+ unit = _("W"),
+ default_value = 1,
+ ),
+ ]
+ ),
+ TextAscii(
+ title = _("Phase"),
+ help = _("The identifier of the phase the power is related to."),
+ ),
+ None,
+ "first"
+)
+
+register_check_parameters(
subgroup_storage,
"fileinfo",
_("Size and age of single files"),