Module: check_mk
Branch: master
Commit: eed0ab6f018b37d666e145297c0061d839712c97
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eed0ab6f018b37…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Apr 1 10:15:38 2014 +0200
cisco_mem: Fixed error handling
---
checks/cisco_mem | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/checks/cisco_mem b/checks/cisco_mem
index 9034ebe..44ff0ac 100644
--- a/checks/cisco_mem
+++ b/checks/cisco_mem
@@ -40,8 +40,9 @@ def check_cisco_mem(item, params, info):
if line[0] == item:
mem_free = saveint(line[2])
mem_used = saveint(line[1])
- mem_total = mem_free + mem_used
- return check_cisco_mem_sub(params, mem_used, mem_total)
+ mem_total = mem_free + mem_used
+ return check_cisco_mem_sub(params, mem_used, mem_total)
+ return 3, "Error getting information. Try a reinventory"
def check_cisco_mem_sub(params, mem_used, mem_total):
perc_used = 100 * (float(mem_used) / float(mem_total))