Module: check_mk
Branch: master
Commit: 1a53743280bbb50d189b99606843ec8bee36132e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a53743280bbb5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 2 14:26:57 2015 +0100
Another minor cleanup
---
web/plugins/wato/check_parameters.py | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 7ca95a1..9f74ac8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2987,7 +2987,7 @@ register_check_parameters(
)
register_check_parameters(
- subgroup_networking,
+ subgroup_os,
"memory_simple",
_("Main memory usage of simple devices"),
Transform(
@@ -2998,20 +2998,20 @@ register_check_parameters(
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)
- ]
+ _("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"))
- ]
+ _("Absolute levels for free memory"),
+ Tuple(
+ elements = [
+ Filesize(title = _("Warning below")),
+ Filesize(title = _("Critical below"))
+ ]
)),
( "ignore", _("Do not impose levels")),
])
@@ -3019,11 +3019,14 @@ register_check_parameters(
],
optional_keys = [],
),
+ # Convert default levels from discovered checks
forth = lambda v: type(v) != dict and { "levels" : (
"perc_used", v) } or v,
),
TextAscii(
- title = _("Module name"),
- allow_empty = False
+ title = _("Module name or empty"),
+ help = _("Leave this empty for systems without modules, which just "
+ "have one global memory usage."),
+ allow_empty = True,
),
"dict",
)