Module: check_mk
Branch: master
Commit: 35bfda77f4f9f36c2b7b40942fa749fea9aa7161
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35bfda77f4f9f3…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Oct 15 12:32:14 2014 +0200
cisco_temp_perf: Fixed item detection in the same way like in cisco_power
---
checks/cisco_temp_perf | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/checks/cisco_temp_perf b/checks/cisco_temp_perf
index 94541bc..5a0ede5 100644
--- a/checks/cisco_temp_perf
+++ b/checks/cisco_temp_perf
@@ -58,7 +58,10 @@ cisco_temp_perf_envmon_states = {
def inventory_cisco_temp_perf(info):
inventory = []
for line in info:
- name = line[0]
+ try:
+ name = line[0].split(',')[0]
+ except:
+ name = line[0]
if name == "":
name = line[4]
inventory.append((name, None))
@@ -66,7 +69,11 @@ def inventory_cisco_temp_perf(info):
def check_cisco_temp_perf(item, _no_params, info):
for line in info:
- if line[0] == item or line[4] == item:
+ try:
+ name = line[0].split(',')[0]
+ except:
+ name = line[0]
+ if name == item or line[4] == item:
temp = saveint(line[1])
if temp != 0:
perfdata = [("temp", temp, None, saveint(line[2]) )]