Module: check_mk
Branch: master
Commit: 36301cd23d5de79a0e84e02ff9b89dee55450d30
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=36301cd23d5de7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 19 14:05:23 2011 +0200
BI: fix index of affected services
---
web/htdocs/bi.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index e3cd2d1..e892544 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -137,21 +137,24 @@ def compile_forest():
for aggr in new_entries:
req_hosts = aggr[0]
+ # All single-host aggregations looked up per host
if len(req_hosts) == 1:
host = req_hosts[0] # pair of (site, host)
entries = g_host_aggregations.get(host, [])
entries.append((group, aggr))
g_host_aggregations[host] = entries
+ # All aggregations containing a specific host
for h in req_hosts:
entries = g_affected_hosts.get(h, [])
entries.append((group, aggr))
g_affected_hosts[h] = entries
+ # All aggregations containing a specific service
services = find_all_leaves(aggr)
for s in services: # triples of site, host, service
entries = g_affected_services.get(s, [])
- entries.append((group, entry))
+ entries.append((group, aggr))
g_affected_services[s] = entries
# Remember successful compile in cache