Module: check_mk
Branch: master
Commit: 0b017d2dba8ed9a3e51ad0435aa18a9b16e220a0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b017d2dba8ed9…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 30 10:00:25 2014 +0200
#0187 FIX hp_proliant_power: Fixed Wato configuration
---
.werks/187 | 9 +++++++++
ChangeLog | 1 +
checks/hp_proliant_power | 6 +++---
web/plugins/wato/check_parameters.py | 14 ++++++++++++++
4 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/.werks/187 b/.werks/187
new file mode 100644
index 0000000..3615f81
--- /dev/null
+++ b/.werks/187
@@ -0,0 +1,9 @@
+Title: hp_proliant_power: Fixed Wato configuration
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i6
+Date: 1406707206
+
+
diff --git a/ChangeLog b/ChangeLog
index c64bf6f..b94b4b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
+ * 0187 FIX: hp_proliant_power: Fixed Wato configuration
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/hp_proliant_power b/checks/hp_proliant_power
index 52d335d..c078823 100644
--- a/checks/hp_proliant_power
+++ b/checks/hp_proliant_power
@@ -41,10 +41,10 @@ def check_hp_proliant_power(item, params, info):
warn, crit = params
state = 0
levels = ''
- if reading > crit:
+ if reading => crit:
state = 2
levels = '( Warning/Critical %s/%s )' % ( warn, crit )
- elif reading > warn:
+ elif reading => warn:
state = 1
levels = '( Warning/Critical %s/%s )' % ( warn, crit )
@@ -52,7 +52,7 @@ def check_hp_proliant_power(item, params, info):
return state, "Current reading: %d Watt" % reading + levels, perf
check_info["hp_proliant_power"] = {
- 'group' : 'epower',
+ 'group' : 'epower_single',
'check_function' : check_hp_proliant_power,
'inventory_function' : inventory_hp_proliant_power,
'service_description' : 'HW Power Meter',
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index d7b684f..932fee4 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4147,6 +4147,20 @@ register_check_parameters(
register_check_parameters(
subgroup_environment,
+ "epower_single",
+ _("Electrical Power for Devices with only one phase"),
+ Tuple(
+ help = _("Levels for the electrical power consumption of a device "),
+ elements = [
+ Integer(title = _("warning if at"), unit = "Watt",
default_value = 300),
+ Integer(title = _("critical if at"), unit = "Watt",
default_value = 400),
+ ]),
+ None,
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
"hw_temperature",
_("Hardware temperature (e.g. switches)"),
Tuple(