Module: check_mk
Branch: master
Commit: 5960c0292581525420bcc60c6b6075b7ba10aaa5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5960c029258152…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 12 15:16:28 2011 +0100
apc_symmetra: handle empty SNMP variables and treat as 0
---
ChangeLog | 3 +++
checks/apc_symmetra | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 52000ee..83b376f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@
Livestatus:
* Check for buffer overflows (replace strcat with strncat, etc.)
+ Checks & Agents:
+ * apc_symmetra: handle empty SNMP variables and treat as 0.
+
1.1.9i3:
INCOMPATIBLE CHANGES:
* You need a current version of Livestatus for Multisite to work!
diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index 221065d..f64d443 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -41,7 +41,7 @@ apc_default_levels = ( 95, 40, 1, 220 )
def check_apc(item, params, info):
BasicBatteryStatus, BasicOutputStatus, AdvBatteryCapacity, \
AdvBatteryTemperature, AdvBatteryCurrent, AdvOutputVoltage, \
- AdvOutputCurrent = [int(x) for x in info[0][:7]]
+ AdvOutputCurrent = [ saveint(x) for x in info[0][:7] ]
RunTimeRemaining = info[0][7]
crit_capacity, crit_batt_temp, crit_batt_curr, crit_voltage = params