Module: check_mk
Branch: master
Commit: 12f48d17d3223c2c7dd27d41e223beb79b32d30f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12f48d17d3223c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 25 14:44:26 2016 +0100
#2953 FIX netextreme_psu_in: Fixed discovery of Power Supply Input checks
---
.werks/2953 | 9 +++++++++
ChangeLog | 1 +
checks/netextreme_psu_in | 10 ++++++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.werks/2953 b/.werks/2953
new file mode 100644
index 0000000..240b70b
--- /dev/null
+++ b/.werks/2953
@@ -0,0 +1,9 @@
+Title: netextreme_psu_in: Fixed discovery of Power Supply Input checks
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453729445
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index f534056..56f02ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -210,6 +210,7 @@
* 2950 FIX: citrix_controller.sessions: Fixed crash in case active/inactive infos are
missing
* 2951 FIX: ibm_svc_disks: Fixed exception with disks having a TB capacity
* 2952 FIX: netextreme_psu_out: Fixed crash in case of phase can not be found
anymore
+ * 2953 FIX: netextreme_psu_in: Fixed discovery of Power Supply Input checks
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/netextreme_psu_in b/checks/netextreme_psu_in
index f69df7f..7cda63a 100644
--- a/checks/netextreme_psu_in
+++ b/checks/netextreme_psu_in
@@ -36,10 +36,12 @@ factory_settings["netextreme_psu_in_default_levels"] = {
def parse_netextreme_psu_in(info):
parsed = {}
- for psu_index, psu_voltage_str, psu_usage_str, psu_factor_str in info:
- parsed["Input %s" % psu_index] = {
- "power" : float(psu_usage_str) * pow(10, int(psu_factor_str)),
- }
+ for psu_index, psu_usage_str, psu_factor_str in info:
+ power = float(psu_usage_str) * pow(10, int(psu_factor_str))
+ if power > 0:
+ parsed["Input %s" % psu_index] = {
+ "power" : power,
+ }
return parsed