Module: check_mk
Branch: master
Commit: 652854aa9c1bdbc42a48c8f41c7190b309cb952c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=652854aa9c1bdb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 31 13:02:13 2018 +0100
5665 FIX Improved timeout error handling when trying to download agent output of a host
Change-Id: Ie81aad0d056b16c1af5b361ffb90283581f947bb
---
.werks/5665 | 10 ++++++++++
web/htdocs/wato.py | 6 +++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/5665 b/.werks/5665
new file mode 100644
index 0000000..d390ef1
--- /dev/null
+++ b/.werks/5665
@@ -0,0 +1,10 @@
+Title: Improved timeout error handling when trying to download agent output of a host
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1517400098
+Class: fix
+
+
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3926ade..dd36d82 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14818,8 +14818,12 @@ def page_download_agent_output():
raise MKGeneralException(_("Invalid host."))
host.need_permission("read")
- success, output, agent_data = watolib.check_mk_automation(host.site_id(),
"get-agent-output",
+ import htmllib
+ try:
+ success, output, agent_data = watolib.check_mk_automation(host.site_id(),
"get-agent-output",
[host_name, ty])
+ except htmllib.RequestTimeout, e:
+ success, output, agent_data = False, "%s" % e, ""
if success:
html.set_output_format("text")