Module: check_mk
Branch: master
Commit: e85fb934e3b97d91f56c8bb95574990030f5cf93
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e85fb934e3b97d…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Wed Mar 8 16:57:08 2017 +0100
4442 FIX mem: Fixed wrong calculation of Available Memory
Change-Id: Ia4e05858d7821d5673e8a6e6dc7106612795e3da
---
.werks/4442 | 10 ++++++++++
checks/mem | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/4442 b/.werks/4442
new file mode 100644
index 0000000..4ab2d81
--- /dev/null
+++ b/.werks/4442
@@ -0,0 +1,10 @@
+Title: mem: Fixed wrong calculation of Available Memory
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1488988585
+Class: fix
+
+
diff --git a/checks/mem b/checks/mem
index ff996e1..6d93823 100644
--- a/checks/mem
+++ b/checks/mem
@@ -322,8 +322,8 @@ def check_mem_linux(_no_item, params, info):
# Available Memory
if "MemAvailable" in meminfo:
- r = check_mem_levels("Available Memory",
meminfo["MemAvailable"],
- meminfo["TotalTotal"],
params.get("levels_available"), of_what = "RAM")
+ r = check_mem_levels("Available Memory", meminfo["MemTotal"]
- meminfo["MemAvailable"],
+ meminfo["MemTotal"], params.get("levels_available"),
of_what = "RAM", show_free=True)
if r[0]:
yield r # only display if non-OK