Module: check_mk
Branch: master
Commit: b1cfb342cd6beb9003ca88147fc579f7334d125c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1cfb342cd6beb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sat Jan 26 22:06:46 2019 +0100
Fixed double escaped user sync job link
Change-Id: I35417607ca6dcb27df540759f22d77fd5567d352
---
cmk/gui/wato/pages/users.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmk/gui/wato/pages/users.py b/cmk/gui/wato/pages/users.py
index 7b7da8d..dc812ef 100644
--- a/cmk/gui/wato/pages/users.py
+++ b/cmk/gui/wato/pages/users.py
@@ -173,7 +173,8 @@ class ModeUsers(WatoMode):
elif self._job_snapshot.is_running():
# Still running
- html.message(_("User synchronization currently running: %s") % self._job_details_link())
+ html.message(
+ HTML(_("User synchronization currently running: ")) + self._job_details_link())
url = html.makeuri([])
html.immediate_browser_redirect(2, url)
@@ -186,7 +187,8 @@ class ModeUsers(WatoMode):
elif not self._job_snapshot.acknowledged_by() and self._job_snapshot.has_exception():
# Finished, but not OK - show info message with links to details
html.show_warning(
- _("Last user synchronization ran into an exception: %s") % self._job_details_link())
+ HTML(_("Last user synchronization ran into an exception: ")) +
+ self._job_details_link())
self._show_user_list()
Module: check_mk
Branch: master
Commit: 933559d30bb0445dbfdc14a3f01c63a8dfccbedb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=933559d30bb044…
Author: Marcel Schulte <ms(a)mathias-kettner.de>
Date: Wed Jan 23 17:10:19 2019 +0100
6874 FIX mkbench: fixed searched command in processes
In script ~/bin/mkbench the helper processes where still searched for old commands. Because of this the script never run successfully. This has been fixed now.
Change-Id: Ice1fc47e656b34fd801e55644618606264e307dc
---
.werks/6874 | 10 ++++++++++
bin/mkbench | 3 +--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.werks/6874 b/.werks/6874
new file mode 100644
index 0000000..ac0b9fa
--- /dev/null
+++ b/.werks/6874
@@ -0,0 +1,10 @@
+Title: mkbench: fixed searched command in processes
+Level: 1
+Component: core
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1548259583
+Class: fix
+
+In script ~/bin/mkbench the helper processes where still searched for old commands. Because of this the script never run successfully. This has been fixed now.
diff --git a/bin/mkbench b/bin/mkbench
index 63b86f5..d9ade8d 100755
--- a/bin/mkbench
+++ b/bin/mkbench
@@ -2854,8 +2854,7 @@ class TestAgentBasedStandardHosts(TestCase):
try:
matched_pids = subprocess.check_output(
- ["pgrep", "-u",
- site_id(), "-f", "python.*check_mk.py --keepalive$"]).split("\n")
+ ["pgrep", "-u", site_id(), "-f", "python.*cmk --keepalive$"]).split("\n")
except subprocess.CalledProcessError, e:
self._test.error(" Found no helper yet (%s)" % e.returncode)
continue
Module: check_mk
Branch: master
Commit: 0fd76b90fe56bd8e9e296e7c23481c9c9fd59c4c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0fd76b90fe56bd…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 24 14:46:40 2019 +0100
Improved config generation performance when there are thousands of hosts AND folders
Change-Id: Iba4ec828bccefc7adca662b78a185800c428848b
---
cmk_base/config.py | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/cmk_base/config.py b/cmk_base/config.py
index fd2df7f..5d834b5 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -438,7 +438,6 @@ class PackedConfig(object):
"service_groups",
"host_groups",
"contacts",
- "host_paths",
"timeperiods",
"extra_service_conf",
"extra_nagios_conf",
@@ -2892,16 +2891,10 @@ class ConfigCache(object):
# Determine hosts within folders
dirnames = [
- x[0][len(cmk.utils.paths.check_mk_config_dir):] + "/"
+ x[0][len(cmk.utils.paths.check_mk_config_dir):] + "/+"
for x in os.walk(cmk.utils.paths.check_mk_config_dir)
]
-
- for dirname in dirnames:
- for hostname in self._all_configured_hosts:
- if self._host_paths[hostname].startswith(dirname):
- self._folder_host_lookup.setdefault(dirname + "+", set()).add(hostname)
-
- self._folder_path_set = set(self._folder_host_lookup.keys())
+ self._folder_path_set = set(dirnames)
# Determine hosttags without folder tag
for hostname in self._all_configured_hosts:
@@ -2919,6 +2912,18 @@ class ConfigCache(object):
self._hosts_grouped_by_tags.setdefault(group_ref, set()).add(hostname)
self._host_grouped_ref[hostname] = group_ref
+ def get_hosts_within_folder(self, folder_path):
+ if folder_path not in self._folder_host_lookup:
+ hosts_in_folder = set()
+ # Strip off "+"
+ folder_path_tmp = folder_path[:-1]
+ for hostname in self._all_configured_hosts:
+ if self._host_paths[hostname].startswith(folder_path_tmp):
+ hosts_in_folder.add(hostname)
+ self._folder_host_lookup[folder_path] = hosts_in_folder
+ return hosts_in_folder
+ return self._folder_host_lookup[folder_path]
+
def get_autochecks_of(self, hostname, world):
try:
return self._autochecks_cache[world][hostname]
@@ -2985,8 +2990,7 @@ class ConfigCache(object):
# Thin out the valid hosts further. If the rule is located in a folder
# we only need the intersection of the folders hosts and the previously determined valid_hosts
- if rule_path in self._folder_host_lookup:
- valid_hosts = self._folder_host_lookup[rule_path].intersection(valid_hosts)
+ valid_hosts = self.get_hosts_within_folder(rule_path).intersection(valid_hosts)
# Contains matched hosts