Module: check_mk
Branch: master
Commit: b99c6d75e2a66161caee98bf1e91eca90d7ad2c4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b99c6d75e2a661…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 26 14:42:14 2018 +0200
6371 FIX Fixed broken Global Settings page when liveproxyd is disabled
The global settings page could only be rendered partially and showed an error
message like "KeyError: 'liveproxyd_log_levels'" when the livestatus proxy
daemon was disabled for a site in all previous 1.5 releases.
Change-Id: I3abcb2ccb9f86890a262cf88615a4252e724202d
---
.werks/6371 | 13 +++++++++++++
cmk/gui/wato/pages/global_settings.py | 3 +++
2 files changed, 16 insertions(+)
diff --git a/.werks/6371 b/.werks/6371
new file mode 100644
index 0000000..89a4e0f
--- /dev/null
+++ b/.werks/6371
@@ -0,0 +1,13 @@
+Title: Fixed broken Global Settings page when liveproxyd is disabled
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1532607063
+
+The global settings page could only be rendered partially and showed an error
+message like "KeyError: 'liveproxyd_log_levels'" when the livestatus proxy
+daemon was disabled for a site in all previous 1.5 releases.
diff --git a/cmk/gui/wato/pages/global_settings.py b/cmk/gui/wato/pages/global_settings.py
index e3811ef..be346d0 100644
--- a/cmk/gui/wato/pages/global_settings.py
+++ b/cmk/gui/wato/pages/global_settings.py
@@ -108,6 +108,9 @@ class GlobalSettingsMode(WatoMode):
header_is_painted = False # needed for omitting empty groups
for domain, varname, valuespec in watolib.configvar_groups()[group_name]:
+ if not domain.enabled():
+ continue
+
if domain == watolib.ConfigDomainCore and varname not in self._default_values:
if config.debug:
raise MKGeneralException("The configuration variable <tt>%s</tt> is unknown to "
warning if the time period of a service is active
Message-ID: <5b59b334.24DGgBwKj6kmuJYL%si(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 686dfc015e4afa1634fd11cbcf4ec00370e36c81
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=686dfc015e4afa…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jul 26 11:22:27 2018 +0200
6385 FIX Check_MK service: Fixed 'missing agent sections' warning if the time period of a service is active
Change-Id: I8d53566cb107abd25b1bc7f7198e0a92a9fd4d4c
---
.werks/6385 | 11 +++++++++++
cmk_base/checking.py | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/6385 b/.werks/6385
new file mode 100644
index 0000000..e722555
--- /dev/null
+++ b/.werks/6385
@@ -0,0 +1,11 @@
+Title: Check_MK service: Fixed 'missing agent sections' warning if the time period of a service is active
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1532596851
+
+
diff --git a/cmk_base/checking.py b/cmk_base/checking.py
index 8598ca8..6e36211 100644
--- a/cmk_base/checking.py
+++ b/cmk_base/checking.py
@@ -203,6 +203,11 @@ def _do_all_checks_on_host(sources, hostname, ipaddress, only_check_plugin_names
success = execute_check(multi_host_sections, hostname, ipaddress, check_plugin_name, item, params, description)
if success:
num_success += 1
+ elif success is None:
+ # If the service is in any timeperiod we do not want to
+ # - increase num_success or
+ # - add to missing sections
+ continue
else:
missing_sections.add(cmk_base.check_utils.section_name_of(check_plugin_name))
@@ -224,7 +229,7 @@ def execute_check(multi_host_sections, hostname, ipaddress, check_plugin_name, i
period = config.check_period_of(hostname, description)
if period and not cmk_base.core.check_timeperiod(period):
console.verbose("Skipping service %s: currently not in timeperiod %s.\n" % (description, period))
- return False
+ return None
elif period:
console.vverbose("Service %s: timeperiod %s is currently active.\n" % (description, period))
Module: check_mk
Branch: master
Commit: 107950162cf28f95ee8f14d5cd93b4fa8f455336
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=107950162cf28f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 26 11:08:30 2018 +0200
Fixed integration tests for available werks
Change-Id: I7afb8d4794a0bca3b3d8a1868be5ae7ecbb6d706
---
tests/integration/cmk/test_site_werks.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/tests/integration/cmk/test_site_werks.py b/tests/integration/cmk/test_site_werks.py
index 05b5688..6514d23 100644
--- a/tests/integration/cmk/test_site_werks.py
+++ b/tests/integration/cmk/test_site_werks.py
@@ -10,14 +10,17 @@ def test_load(site):
def test_regular_werks(site):
werks = cmk.werks.load()
- regular_werks = [ id for id in werks.keys() if id < 7500 ]
+ regular_werks = [ werk for werk in werks.values()
+ if werk["edition"] == "cre" ]
+
assert len(regular_werks) > 1000
def test_enterprise_werks(site):
werks = cmk.werks.load()
- enterprise_werks = [ id for id in werks.keys() if id >= 8000 ]
+ enterprise_werks = [ werk for werk in werks.values()
+ if werk["edition"] == "cee" ]
if site.version.edition() == "raw":
assert not enterprise_werks
@@ -25,8 +28,13 @@ def test_enterprise_werks(site):
assert enterprise_werks
-def test_cmk_omd_werks(site):
+def test_managed_werks(site):
werks = cmk.werks.load()
- cmk_omd_werks = [ id for id in werks.keys() if id >= 7500 and id < 8000 ]
- assert cmk_omd_werks
+ managed_werks = [ werk for werk in werks.values()
+ if werk["edition"] == "cme" ]
+
+ if site.version.edition() != "managed":
+ assert not managed_werks
+ else:
+ assert managed_werks