Module: check_mk
Branch: master
Commit: 8935532fc5f539f244d8b0084bdcd0a346dce610
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8935532fc5f539…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Nov 17 13:53:49 2017 +0100
5518 FIX win.mem: Fix incorrect representation of absolute memory levels in graphs
Previously, a warn or crit level of eg. 20 GB would be displayed in the graph as 20 TB
due to the levels not being set to the same unit as the performance value itself.
The problem only affected the levels passed to the metrics system for representation,
not the actual levels used for evaluation.
Change-Id: Id9845a02f886226d58f13a1734613f7b5f5f9b8d
---
.werks/5518 | 14 ++++++++++++++
checks/mem | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/5518 b/.werks/5518
new file mode 100644
index 0000000..35120e8
--- /dev/null
+++ b/.werks/5518
@@ -0,0 +1,14 @@
+Title: win.mem: Fix incorrect representation of absolute memory levels in graphs
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1510923049
+
+Previously, a warn or crit level of eg. 20 GB would be displayed in the graph as 20 TB
+due to the levels not being set to the same unit as the performance value itself.
+The problem only affected the levels passed to the metrics system for representation,
+not the actual levels used for evaluation.
diff --git a/checks/mem b/checks/mem
index 7d0ce96..d90f085 100644
--- a/checks/mem
+++ b/checks/mem
@@ -500,11 +500,11 @@ def check_mem_windows(item, params, info):
else:
crit_kb = crit * 1024
- perfdata = [(paramname, used_kb / 1024.0, warn_kb, crit_kb, 0, total_kb /
1024.0)]
+ perfdata = [(paramname, used_kb/1024.0, warn_kb/1024.0, crit_kb/1024.0, 0,
total_kb/1024.0)]
# Predictive levels have no level information in the performance data
else:
- perfdata = [(paramname, used_kb / 1024.0, None, None, 0, total_kb / 1024.0)]
+ perfdata = [(paramname, used_kb/1024.0, None, None, 0, total_kb/1024.0)]
if what == "Mem":
perfdata.append(("mem_total", total_kb / 1024.0))