Module: check_mk
Branch: master
Commit: 1573fba0e07da35cfa8136debfcdbd9c6fbf6cf7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1573fba0e07da3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 20 15:06:16 2018 +0200
Analyse configuration: Show warning message when no site usable with AC
Change-Id: I9d56bbe8bc9a2852d89a1c33f897b33f34ce9c4c
---
web/htdocs/wato.py | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 918dcc8..ea0fc47 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -17062,6 +17062,7 @@ class ModeAnalyzeConfig(WatoMode):
def __init__(self):
super(ModeAnalyzeConfig, self).__init__()
+ self._logger = logger.getChild("analyze-config")
self._acks = self._load_acknowledgements()
@@ -17111,6 +17112,11 @@ class ModeAnalyzeConfig(WatoMode):
def page(self):
+ if not self._analyze_site_ids():
+ html.show_info(_("Analyze configuration can only be used with the local site and "
+ "distributed WATO slave sites. You currently have no such site configured."))
+ return
+
results_by_category = self._perform_tests()
site_ids = sorted(self._analyze_site_ids())
@@ -17237,13 +17243,16 @@ class ModeAnalyzeConfig(WatoMode):
def _perform_tests(self):
+ test_site_ids = self._analyze_site_ids()
+
+ self._logger.debug("Executing tests for %d sites" % len(test_site_ids))
results_by_site = {}
# Results are fetched simultaneously from the remote sites
result_queue = multiprocessing.JoinableQueue()
processes = []
- for site_id in self._analyze_site_ids():
+ for site_id in test_site_ids:
process = multiprocessing.Process(target=self._perform_tests_for_site,
args=(site_id, result_queue))
process.start()
@@ -17277,6 +17286,8 @@ class ModeAnalyzeConfig(WatoMode):
log_exception()
html.show_error("%s: %s" % (site_id, e))
+ self._logger.debug("Got test results")
+
# Group results by category in first instance and then then by test
results_by_category = {}
for site_id, results in results_by_site.items():
@@ -17302,6 +17313,7 @@ class ModeAnalyzeConfig(WatoMode):
# Executes the tests on the site. This method is executed in a dedicated
# subprocess (One per site)
def _perform_tests_for_site(self, site_id, result_queue):
+ self._logger.debug("[%s] Starting" % site_id)
try:
# Would be better to clean all open fds that are not needed, but we don't
# know the FDs of the result_queue pipe. Can we find it out somehow?
@@ -17326,12 +17338,15 @@ class ModeAnalyzeConfig(WatoMode):
results_data = watolib.do_remote_automation(
config.site(site_id), "check-analyze-config", [])
+ self._logger.debug("[%s] Finished" % site_id)
+
result = {
"state" : 0,
"response" : results_data,
}
except Exception, e:
+ self._logger.exception("[%s] Failed" % site_id)
log_exception()
result = {
"state" : 1,
Module: check_mk
Branch: master
Commit: 541e370bc933c5ae772a284bf3a1c1ff669fbf8d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=541e370bc933c5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 20 15:10:05 2018 +0200
Add information to apache process test
Change-Id: I1c607c1722d9789588e6ccde785cd4f141720bc3
---
web/plugins/wato/ac_tests.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/web/plugins/wato/ac_tests.py b/web/plugins/wato/ac_tests.py
index 02ca080..17b549a 100644
--- a/web/plugins/wato/ac_tests.py
+++ b/web/plugins/wato/ac_tests.py
@@ -372,7 +372,12 @@ class ACTestApacheNumberOfProcesses(ACTest, BPApacheTest):
"<p>Possible actions:<ul>"
"<li>Change the <a href=\"wato.py?mode=edit_configvar&varname=apache_process_tuning\">number of apache processes</a></li>"
"</ul>"
- "</p>")
+ "</p>"
+ "<p>Once you have verified your settings, you can acknowledge this test. The "
+ "test will not automatically turn to OK, because it can not exactly estimate "
+ "the required memory nedded by the apache processes."
+ "</p>"
+ )
def is_relevant(self):
Module: check_mk
Branch: master
Commit: 4acbc57c5be45d5efce04e6d8ae29a9dfeb41a47
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4acbc57c5be45d…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Apr 20 11:40:07 2018 +0200
Win-agent: Run unit tests only in its own target
Do not run unit tests as a post-build step. Produce XUnit XML output for
the unit tests.
---
agents/windows/Makefile.am | 156 ++++++++++++++++++++++++++-------------------
agents/windows/build-agent | 34 ++++------
2 files changed, 104 insertions(+), 86 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=4acbc57c5b…