Module: check_mk
Branch: master
Commit: 19a5a0d9ea52754af21b765c9784c98f9c942148
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19a5a0d9ea5275…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 16 16:30:57 2011 +0100
FIX: dell_poweredge_cpu: handle sporadic invalid output from agent
---
ChangeLog | 2 ++
checks/dell_powerconnect_cpu | 5 ++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 26f37c9..8dadd28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -124,6 +124,8 @@
* FIX: mem.vmalloc: fix default levels (32 and 64 was swapped)
* FIX: smart: make levels work (thanks to Bernhard Schmidt)
* FIX: PNP template if if/if64: reset LC_ALL, avoids syntax error
+ * FIX: dell_powerconnect_cpu: handle sporadic incomplete output
+ from SNMP agent
1.1.12p4:
Multisite:
diff --git a/checks/dell_powerconnect_cpu b/checks/dell_powerconnect_cpu
index a0209cf..b7787dc 100644
--- a/checks/dell_powerconnect_cpu
+++ b/checks/dell_powerconnect_cpu
@@ -48,7 +48,10 @@ def inventory_dell_powerconnect_cpu(checkname, info):
# Check of dell power connect CPU details.
def check_dell_powerconnect_cpu(item, params, info):
- enabled, onesecondperc, oneminuteperc, fiveminutesperc = info[0]
+ try:
+ enabled, onesecondperc, oneminuteperc, fiveminutesperc = map(int, info[0])
+ except ValueError:
+ raise MKCounterWrapped("", "Ignoring empty data from SNMP
agent")
if int(enabled) == 1:
cpu_load = int(onesecondperc)
if cpu_load >= 0 <= 100: