Module: check_mk
Branch: master
Commit: 4a07d7eb1aaeb84f6a65242aec21a898a3642ad6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4a07d7eb1aaeb8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 6 16:51:06 2015 +0100
#2755 FIX apc_symmetra: Check is handling missing data more robust now
---
.werks/2755 | 10 ++++++++++
ChangeLog | 1 +
checks/apc_symmetra | 4 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2755 b/.werks/2755
new file mode 100644
index 0000000..04eb7f9
--- /dev/null
+++ b/.werks/2755
@@ -0,0 +1,10 @@
+Title: apc_symmetra: Check is handling missing data more robust now
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1446825005
+
+
diff --git a/ChangeLog b/ChangeLog
index 83b7a8e..01e4df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 2753 FIX: ad_replication: Made check more robust agains garbled agent output
* 2773 FIX: omd_staomd_status: handle case where site's software installation is
broken
* 2754 FIX: ipmitool: Killing asynchronous ipmitool call after 300 seconds...
+ * 2755 FIX: apc_symmetra: Check is handling missing data more robust now
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index dd89bf1..239a132 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -55,11 +55,13 @@ factory_settings["apc_default_levels"] = {
}
def inventory_apc(info):
- if len(info) > 0:
+ if info:
return [(None, "apc_default_levels")]
def check_apc(item, params, info):
+ if not info:
+ return
battery_status, output_status, battery_capacity, system_temp, battery_replace, \
num_batt_packs, battery_current, input_voltage, output_voltage, output_current, \
time_remaining, calib_result, output_load = [ saveint(x) for x in info[0][:13] ]