Module: check_mk
Branch: master
Commit: 4d5253a6691e566b41665c0c8f929f77c1520f62
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d5253a6691e56…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Mar 9 15:29:56 2017 +0100
Added description to werk #4441 and help text to ruleset
Change-Id: I063df904298092918ef4a5f8373f5fca26b7892e
---
.werks/4441 | 17 ++++++++++++++++-
web/plugins/wato/check_parameters.py | 15 +++++++++++++--
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/.werks/4441 b/.werks/4441
index b207378..e8ebe12 100644
--- a/.werks/4441
+++ b/.werks/4441
@@ -1,4 +1,4 @@
-Title: mem: new configurable thresholds for "Avaiable memory"
+Title: mem: new configurable thresholds for "Estimated RAM for new processes"
Level: 1
Component: checks
Compatible: compat
@@ -7,4 +7,19 @@ Version: 1.5.0i1
Date: 1488458833
Class: feature
+Now thresholds for the graph "Estimated RAM for new processes" are
+configureable. This is optional and will use the "MemAvailable" value,
+which is part of meminfo since kernel version 3.14. This value will not be
+checked on older kernel versions and thresholds will not be used even if a
+rule has been set.
+From
kernel.org:
+An estimate of how much memory is available for starting new
+applications, without swapping. Calculated from MemFree,
+SReclaimable, the size of the file LRU lists, and the low
+watermarks in each zone.
+The estimate takes into account that the system needs some
+page cache to function well, and that not all reclaimable
+slab will be reclaimable, due to items being in use. The
+impact of those factors will vary from system to system.
+(https://www.kernel.org/doc/Documentation/filesystems/proc.txt)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 5e4cecb..090300f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -7428,9 +7428,10 @@ def UpperMemoryLevels(what, default_percents=None, of_what=None):
]
)
-def LowerMemoryLevels(what, default_percents=None, of_what=None):
+def LowerMemoryLevels(what, default_percents=None, of_what=None, help_text=None):
return CascadingDropdown(
title = _("Lower levels for %s") % what,
+ help = help_text,
choices = [
( "perc_free", _("Percentual levels"),
FreePercentage(default_percents, of_what) ),
( "abs_free", _("Absolute levels"), FreeSize() ),
@@ -7463,7 +7464,17 @@ register_check_parameters(
( "levels_writeback", UpperMemoryLevels(_("Disk
Writeback"))),
( "levels_committed", UpperMemoryLevels(_("Committed
memory"), (100.0, 150.0), _("RAM + Swap"))),
( "levels_commitlimit", LowerMemoryLevels(_("Commit
Limit"), ( 20.0, 10.0), _("RAM + Swap"))),
- ( "levels_available", LowerMemoryLevels(_("RAM
available"), ( 20.0, 10.0), _("RAM"))),
+ ( "levels_available", LowerMemoryLevels(_("Estimated RAM for
new processes"), ( 20.0, 10.0), _("RAM"),
+ _("If the host has a kernel of version 3.14 or
newer, the information MemAvailable is provided: "
+ "\"An estimate of how much memory is
available for starting new "
+ "applications, without swapping. Calculated
from MemFree, "
+ "SReclaimable, the size of the file LRU lists,
and the low "
+ "watermarks in each zone. "
+ "The estimate takes into account that the
system needs some "
+ "page cache to function well, and that not all
reclaimable "
+ "slab will be reclaimable, due to items being
in use. The "
+ "impact of those factors will vary from system
to system.\" "
+
"(https://www.kernel.org/doc/Documentation/filesystems/proc.txt)"))),
( "levels_vmalloc", LowerMemoryLevels(_("Largest Free
VMalloc Chunk"))),
( "handle_hw_corrupted_error", MonitoringState(
title = _("Handle Hardware Corrupted Error"),