Module: check_mk
Branch: master
Commit: 6d25e2b87a6d71f1a8b9422f9c95e4d845e1c22d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6d25e2b87a6d71…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Aug 8 15:16:25 2014 +0200
cisco_temp_sensor: Changed check to work with old cmk versions
---
checks/cisco_temp_sensor | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/cisco_temp_sensor b/checks/cisco_temp_sensor
index f41cdaf..d393715 100644
--- a/checks/cisco_temp_sensor
+++ b/checks/cisco_temp_sensor
@@ -141,10 +141,12 @@ def parse_cisco_temp_sensor(info):
def inventory_cisco_temp_sensor(info):
sensors = parse_cisco_temp_sensor(info)
+ inventory = []
for id, descr, sensortype, value, sensorstate, levels in sensors:
# Use all temperature sensors with a non-empty description and valid threshold
if descr != None and sensortype == '8' and len(levels) in [ 2, 4 ]:
- yield descr, levels[0:2]
+ inventory.append(( descr, levels[0:2] ))
+ return inventory
def check_cisco_temp_sensor(item, params, info):
sensors = parse_cisco_temp_sensor(info)