Module: check_mk
Branch: master
Commit: 1b1bccddde07f32998334b8ead3872e3be3e0cdd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b1bccddde07f3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 17 10:41:07 2014 +0100
mem: fix exception in case of absolute levels
---
checks/mem | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/checks/mem b/checks/mem
index 6b9f084..2e26709 100644
--- a/checks/mem
+++ b/checks/mem
@@ -117,8 +117,14 @@ def check_mem_windows(item, params, info):
# In perfdata show warn/crit as absolute values
if type(warn) == float:
warn_kb = total_kb * warn / 100 / 1024
+ else:
+ warn_kb = warn * 1024
+
if type(crit) == float:
crit_kb = total_kb * crit / 100 / 1024
+ else:
+ crit_kb = crit * 1024
+
perfdata.append((paramname, used_kb / 1024.0, warn_kb, crit_kb, 0, total_kb /
1024.0))
# Do averaging, if configured, just for matching the levels