Module: check_mk
Branch: master
Commit: 0e9bf0a210255cfe1d8ab5b799fa64e1ddb189eb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0e9bf0a210255c…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 1 13:54:31 2015 +0200
#1261 FIX apc_symmetra_power: Ignore unused phases while disocery
---
.werks/1261 | 9 +++++++++
ChangeLog | 1 +
checks/apc_symmetra_power | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1261 b/.werks/1261
new file mode 100644
index 0000000..a37beca
--- /dev/null
+++ b/.werks/1261
@@ -0,0 +1,9 @@
+Title: apc_symmetra_power: Ignore unused phases while disocery
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1435751643
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index b9ac12f..c8a369d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
* 2362 FIX: mk_logwatch: fix cases where one logfile is listsed more than once in
logwatch.cfg...
* 2363 FIX: jolokia_metrics.uptime: Do not inventory instances where Uptime is
missing - avoid crashed check
* 2381 FIX: emc_datadomain_fans: Made check more robust against broken SNMP output
+ * 1261 FIX: apc_symmetra_power: Ignore unused phases while disocery
Multisite:
* 2314 FIX: Availability: fixed exception when grouping by host or service group
diff --git a/checks/apc_symmetra_power b/checks/apc_symmetra_power
index 86afaae..8d260f9 100644
--- a/checks/apc_symmetra_power
+++ b/checks/apc_symmetra_power
@@ -27,7 +27,10 @@
apc_power_default_levels = (20, 1) # warning / critical *below* those levels (Watt)
def inventory_apc_power(info):
- return [ (line[0], "", "apc_power_default_levels") for line in
info ]
+ for line in info:
+ value = int(line[1])
+ if value not in [ 0, -1]:
+ yield line[0], "apc_power_default_levels"
def check_apc_power(item, params, info):
warn, crit = params