Module: check_mk
Branch: master
Commit: 074bb3f6b72ea1c532b7c1d5418d2bea874f98e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=074bb3f6b72ea1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 14 10:25:24 2012 +0200
Removed wmic_process rule from "inventory services" as the check does not
support inventory
---
.bugs/704 | 13 ++++++++
ChangeLog | 1 +
web/plugins/wato/check_parameters.py | 54 +++++++++++++++-------------------
3 files changed, 38 insertions(+), 30 deletions(-)
diff --git a/.bugs/704 b/.bugs/704
new file mode 100644
index 0000000..5d858d9
--- /dev/null
+++ b/.bugs/704
@@ -0,0 +1,13 @@
+Title: Better check API validation
+Component: core
+State: open
+Date: 2012-09-14 10:18:45
+Targetversion: future
+Class: cleanup
+
+The returned inventory data is validated if it is a list. But not further. It would be
good
+to also validate if the items in the list are tuples of 2 or 3 items while the first
item
+is a single value of none or a string and the second is a string or also none.
+
+Same for the data returned by the check data.
+
diff --git a/ChangeLog b/ChangeLog
index 6a31b8a..9155cae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* Improved visualization of ruleset lists/dictionaries
* Encoding special chars in RegExp valuespec (e.g. logwatch patterns)
* Added check_interval and retry_interval rules for host checks
+ * Removed wmic_process rule from "inventory services" as the check does not
support inventory
* FIX: Removed double collect_hosts() call in activate changes hook
* FIX: Fixed double hook execution when using localized multisite
* FIX: User list shows names of contactgroups when no alias given
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 328239c..c14ec5a 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1667,36 +1667,6 @@ checkgroups.append((
help = _("The identificator of the themal sensor.")),
"first"))
-
-
-checkgroups.append((
- subgroup_applications,
- "wmic_process",
- _("Memory and CPU of processes on Windows"),
- Tuple(
- elements = [
- TextAscii(
- title = _("Name of the process"),
- allow_empty = False,
- ),
- Integer(title = _("Memory waring at"), unit = "MB"),
- Integer(title = _("Memory critical at"), unit = "MB"),
- Integer(title = _("Pagefile warning at"), unit = "MB"),
- Integer(title = _("Pagefile critical at"), unit = "MB"),
- Percentage(title = _("CPU usage warning at")),
- Percentage(title = _("CPU usage critical at")),
- ],
- ),
- TextAscii(
- title = _("Process name for usage in the Nagios service description"),
- allow_empty = False),
- "first"))
-
-
-
-
-
-
# Create rules for check parameters of inventorized checks
for subgroup, checkgroup, title, valuespec, itemspec, matchtype in checkgroups:
if not valuespec:
@@ -1739,6 +1709,30 @@ register_rulegroup("static", _("Manual
Checks"),
_("Statically configured Check_MK checks that do not rely on the
inventory"))
group = "static"
+# wmic_process does not support inventory at the moment
+checkgroups.append((
+ subgroup_applications,
+ "wmic_process",
+ _("Memory and CPU of processes on Windows"),
+ Tuple(
+ elements = [
+ TextAscii(
+ title = _("Name of the process"),
+ allow_empty = False,
+ ),
+ Integer(title = _("Memory waring at"), unit = "MB"),
+ Integer(title = _("Memory critical at"), unit = "MB"),
+ Integer(title = _("Pagefile warning at"), unit = "MB"),
+ Integer(title = _("Pagefile critical at"), unit = "MB"),
+ Percentage(title = _("CPU usage warning at")),
+ Percentage(title = _("CPU usage critical at")),
+ ],
+ ),
+ TextAscii(
+ title = _("Process name for usage in the Nagios service description"),
+ allow_empty = False),
+ "first"))
+
# Add checks that have parameters but are only configured as manual checks
checkgroups.append((
subgroup_applications,