Module: check_mk
Branch: master
Commit: 13218875f56c9115b48d96fc99aa6c48fd08d7b6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=13218875f56c91…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Oct 24 10:45:26 2018 +0200
docker_container_status{,.health}: Updated manpages
Change-Id: I304b6815297814fe8d8c183d8718c66c51c3dbb2
---
checkman/docker_container_status | 3 +++
checkman/docker_container_status.health | 3 +++
2 files changed, 6 insertions(+)
diff --git a/checkman/docker_container_status b/checkman/docker_container_status
index db6ff8b..9789593 100644
--- a/checkman/docker_container_status
+++ b/checkman/docker_container_status
@@ -7,6 +7,9 @@ description:
Monitors the status of docker containers. A status of "running" is treated as OK,
any other status is treated as CRIT.
+ To make this check work the agent plugin
+ {{mk_docker_container_piggybacked}} have to be installed.
+
item:
None
diff --git a/checkman/docker_container_status.health b/checkman/docker_container_status.health
index 93a63a7..434d12f 100644
--- a/checkman/docker_container_status.health
+++ b/checkman/docker_container_status.health
@@ -8,6 +8,9 @@ description:
the HEALTHCHECK API. A Status of "healthy" is treated as OK,
"starting" as WARN, "unhealthy" as CRIT.
+ To make this check work the agent plugin
+ {{mk_docker_container_piggybacked}} have to be installed.
+
item:
None
Module: check_mk
Branch: master
Commit: 5ef1ac088bc3ada990129bd103756a0357722d83
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ef1ac088bc3ad…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Oct 23 14:38:17 2018 +0200
6671 FIX WATO Web API: Now able to configured rulesets with boolean settings
Rules with a configurable positive/negative outcome where incorrectly translated
in a <tt>get_ruleset</tt> API call. Furthermore, <tt>set_ruleset</tt> had an error when
validating these kind of rules.
Change-Id: Iac6e3075845ed09a463cb56d91597e5aa3106c4b
---
.werks/6671 | 15 +++++++++++++++
cmk/gui/plugins/webapi/webapi.py | 2 ++
cmk/gui/watolib.py | 4 ++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/6671 b/.werks/6671
new file mode 100644
index 0000000..e05b103
--- /dev/null
+++ b/.werks/6671
@@ -0,0 +1,15 @@
+Title: WATO Web API: Now able to configured rulesets with boolean settings
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1540298086
+
+Rules with a configurable positive/negative outcome where incorrectly translated
+in a <tt>get_ruleset</tt> API call. Furthermore, <tt>set_ruleset</tt> had an error when
+validating these kind of rules.
+
+
diff --git a/cmk/gui/plugins/webapi/webapi.py b/cmk/gui/plugins/webapi/webapi.py
index f1b94b2..7f2dedb 100644
--- a/cmk/gui/plugins/webapi/webapi.py
+++ b/cmk/gui/plugins/webapi/webapi.py
@@ -657,6 +657,8 @@ class APICallRules(APICallCollection):
rule_vs = watolib.Ruleset(ruleset_name).rulespec.valuespec
for folder_path, rules in new_ruleset.items():
for rule in rules:
+ if "negate" in rule:
+ continue # ugly, rules with a boolean value have a different representation
value = rule["value"]
try:
rule_vs.validate_datatype(value, "test_value")
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index 49c09f2..2dae2f4 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -8687,9 +8687,9 @@ class Rule(object):
result["value"] = self.value
else:
if self.value:
- result["conditions"]["negate"] = False
+ result["negate"] = False
else:
- result["conditions"]["negate"] = True
+ result["negate"] = True
result["conditions"]["host_specs"] = self.host_list
result["conditions"]["host_tags"] = self.tag_specs