Module: check_mk
Branch: master
Commit: 8660dc4b848670a98c4892e838bfb9ba8ac96e59
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8660dc4b848670…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 24 16:38:39 2018 +0200
Add some ruleset to the test site to find config load related issues
Change-Id: Ib78b944dff5fc9636a3982d52056b653269d2e7e
---
tests/testlib/__init__.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 6e6a1b4..42bbd2f 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -798,6 +798,33 @@ class Site(object):
"Failed to initialize WATO data structures " \
"(Still missing: %s)" % missing_files
+ self._add_wato_test_config(web)
+
+
+ # Add some test configuration that is not test specific. These settings are set only to have a
+ # bit more complex Check_MK config.
+ def _add_wato_test_config(self, web):
+ # This entry is interesting because it is a check specific setting. These
+ # settings are only registered during check loading. In case one tries to
+ # load the config without loading the checks in advance, this leads into an
+ # exception.
+ # We set this config option here trying to catch this kind of issue.
+ web.set_ruleset("fileinfo_groups", {
+ "ruleset": {
+ "": [ # "" -> folder
+ {
+ 'conditions': {
+ 'host_specs': ['@all'],
+ 'host_tags': []
+ },
+ 'options': {},
+ 'path': '',
+ 'value': [('TESTGROUP', ('*gwia*', ''))]
+ },
+ ],
+ }
+ })
+
def _missing_but_required_wato_files(self):
required_files = [
Module: check_mk
Branch: master
Commit: c7147547e8e5729b2c0732aca43656536398dc1f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7147547e8e572…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 24 17:13:41 2018 +0200
6155 FIX Service discovery page: Active checks were not correctly shown in specific cases
It could happen that some active checks were not correctly shown in the tables
"active checks" or "disabled active checks". This was caused by specific
disabled services rules. For example when using this two rules:
1. Enable all services starting with "HTTP"
2. Disable all services
In this situation the HTTP service was not displayed on the discovery page.
Change-Id: I91f03922529d93a1ba9c702ecfb2bf31a6f9f6ea
---
.werks/6155 | 18 ++++++++++++++++++
cmk_base/discovery.py | 7 +++++++
2 files changed, 25 insertions(+)
diff --git a/.werks/6155 b/.werks/6155
new file mode 100644
index 0000000..451a14f
--- /dev/null
+++ b/.werks/6155
@@ -0,0 +1,18 @@
+Title: Service discovery page: Active checks were not correctly shown in specific cases
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527174418
+
+It could happen that some active checks were not correctly shown in the tables
+"active checks" or "disabled active checks". This was caused by specific
+disabled services rules. For example when using this two rules:
+
+1. Enable all services starting with "HTTP"
+2. Disable all services
+
+In this situation the HTTP service was not displayed on the discovery page.
diff --git a/cmk_base/discovery.py b/cmk_base/discovery.py
index ebc0e5a..aa62ca1 100644
--- a/cmk_base/discovery.py
+++ b/cmk_base/discovery.py
@@ -1021,6 +1021,13 @@ def _merge_manual_services(services, hostname, on_error):
# Handle disabled services -> "ignored"
for (check_plugin_name, item), (check_source, paramstring) in services.items():
+ if check_source in [ "legacy", "active", "custom" ]:
+ # These are ignored later in get_check_preview
+ # TODO: This needs to be cleaned up. The problem here is that service_description() can not
+ # calculate the description of active checks and the active checks need to be put into
+ # "[source]_ignored" instead of ignored.
+ continue
+
try:
descr = config.service_description(hostname, check_plugin_name, item)
except Exception, e:
Module: check_mk
Branch: master
Commit: e6494fb8240bb2c39d6c1ee7e647a92ac8a5860b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6494fb8240bb2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed May 23 19:30:02 2018 +0200
Vanilla Agent RPM: Dont terminate build because of binaries in package
Change-Id: I747dc327981f04e4adecd099cf69ae63297eddcc
---
agents/check-mk-agent.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/agents/check-mk-agent.spec b/agents/check-mk-agent.spec
index ca0378f..2f33493 100644
--- a/agents/check-mk-agent.spec
+++ b/agents/check-mk-agent.spec
@@ -42,6 +42,8 @@ Provides: check_mk-agent check_mk_agent
The Check_MK Agent uses xinetd to provide information about the system
on TCP port 6556. This can be used to monitor the host via Check_MK.
+%define _binaries_in_noarch_packages_terminate_build 0
+
%prep
%setup -n check-mk-agent-%{_version}