Module: check_mk
Branch: master
Commit: d18059b275078acb8256b66cd8603b875cc7266e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d18059b275078a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 20 13:14:01 2018 +0200
6022 FIX Analyze configuration: Enabled livestatus proxy is now deceted correctly
Change-Id: Ib410cf374f43f9547bc436edc96e3873855bbe0b
---
.werks/6022 | 11 +++++++++++
web/htdocs/watolib.py | 9 +++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/6022 b/.werks/6022
new file mode 100644
index 0000000..1cb7260
--- /dev/null
+++ b/.werks/6022
@@ -0,0 +1,11 @@
+Title: Analyze configuration: Enabled livestatus proxy is now deceted correctly
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1524222712
+
+
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index f345c05..d5f145c 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -9710,8 +9710,13 @@ automation_commands["check-analyze-config"] =
check_analyze_config
def site_is_using_livestatus_proxy(site_id):
- site = config.site(site_id)
- socket = site["socket"]
+ sites = SiteManagement.load_sites()
+ site = sites[site_id]
+
+ socket = site.get("socket")
+ if not socket:
+ return False # local site
+
return type(socket) == tuple and socket[0] == "proxy"
#.