Module: check_mk
Branch: master
Commit: 4cbcfec31915b53eecc5434cba847a97086cc5a4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4cbcfec31915b5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 21 12:46:02 2017 +0100
4027 FIX BI Aggregations: fixed compilation problem with BI aggregations when using sites
without hosts
BI aggregations did not compile correctly for sites without hosts.
Happens when there was an empty viewer site with several connected real sites.
Change-Id: Id84214e23443b02fe1173038ce848c771cc0b0fd
---
.werks/4027 | 11 +++++++++++
web/htdocs/bi.py | 5 +++++
2 files changed, 16 insertions(+)
diff --git a/.werks/4027 b/.werks/4027
new file mode 100644
index 0000000..cfb420f
--- /dev/null
+++ b/.werks/4027
@@ -0,0 +1,11 @@
+Title: BI Aggregations: fixed compilation problem with BI aggregations when using sites
without hosts
+Level: 1
+Component: bi
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487677398
+
+BI aggregations did not compile correctly for sites without hosts.
+Happens when there was an empty viewer site with several connected real sites.
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index e1bc75c..f2d247b 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -700,6 +700,11 @@ class BISitedataManager(object):
cleanup_orphaned_files = True
only_sites = [x[0] for x in missing_sites]
new_data = self._query_data(only_sites)
+
+ sites_with_no_data = set(map(lambda x: x[0], missing_sites)) -
set(new_data.keys())
+ for site in sites_with_no_data:
+ new_data[site] = {}
+
for site, sitedata in new_data.items():
# Write data to disk
siteinfo = (site, dict(missing_sites).get(site))