Module: check_mk
Branch: master
Commit: 96624bd851c3b540bdbf93354e448d4044a3189e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=96624bd851c3b5…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Feb 26 16:58:11 2015 +0100
New WATO rule for simple memory checks
---
web/plugins/wato/check_parameters.py | 38 ++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index f3e5f49..1ed7014 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2987,6 +2987,44 @@ register_check_parameters(
)
register_check_parameters(
+ subgroup_networking,
+ "memory_simple",
+ _("Main memory usage of simple devices"),
+ Transform(
+ Dictionary(
+ help = _("Memory levels for simple devices not running more complex
OSs"),
+ elements = [
+ ("levels", CascadingDropdown(
+ title = _("Levels for memory usage"),
+ choices = [
+ ( "perc_used",
+ _("Percentual levels for used memory"),
+ Tuple(
+ elements = [
+ Percentage(title = _("Warning at a memory usage
of"), default_value = 80.0, maxvalue = None),
+ Percentage(title = _("Critical at a memory usage
of"), default_value = 90.0, maxvalue = None)
+ ]
+ )),
+ ( "abs_free",
+ _("Absolute levels for free memory"),
+ Tuple(
+ elements = [
+ Filesize(title = _("Warning below")),
+ Filesize(title = _("Critical below"))
+ ]
+ )),
+ ( "ignore", _("Do not impose levels")),
+ ])
+ ),
+ ],
+ optional_keys = [],
+ ),
+ forth = lambda old: type(old) != dict and { "levels" : (
"perc_used", old) },
+ ),
+ None, None
+)
+
+register_check_parameters(
subgroup_os,
"memory_multiitem",
_("Main memory usage of devices with modules"),