Module: check_mk
Branch: master
Commit: 896d0ed16124f589e83204b383f72aec1b3325ac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=896d0ed16124f5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 16 16:14:58 2015 +0200
#2597 FIX Fix settings downtimes on BI aggregates in distributed environment
This fixes the exception about a missing key <tt>site</tt>.
---
.werks/2597 | 10 ++++++++++
ChangeLog | 3 ++-
web/htdocs/views.py | 6 +++---
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/.werks/2597 b/.werks/2597
new file mode 100644
index 0000000..95e4cb6
--- /dev/null
+++ b/.werks/2597
@@ -0,0 +1,10 @@
+Title: Fix settings downtimes on BI aggregates in distributed environment
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1442412858
+
+This fixes the exception about a missing key <tt>site</tt>.
diff --git a/ChangeLog b/ChangeLog
index eada469..66b10b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,8 +82,8 @@
NOTE: Please refer to the migration notes!
* 2590 new check raritan_px2_sensors: monitors the temperature, humidity, air flow
and pressure sensors connected to a Raritan PX2 Device
* 2591 new check raritan_emx_sensors: monitors contact, temperature, humidity, air
flow and pressure sensors connected to a Raritan EMX Device
- * 2625 kernel.util and winperf_processor.util checks now support an optional graph
showing utilization of individual cores...
* 2592 new checks netextreme_fan, netextreme_psu, netextreme_psu_in,
netextreme_psu_out, netextreme_temp for Extreme Networks Switches...
+ * 2625 kernel.util and winperf_processor.util checks now support an optional graph
showing utilization of individual cores...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
@@ -231,6 +231,7 @@
* 2556 FIX: Availability: Fixed exception when trying to group BI aggregations by
host/service-groups
* 2580 FIX: Remove bogus ;0 in comment of problem acknowledgements...
* 2604 FIX: Dashboards: Improved error handling in case of broken dashlet
+ * 2597 FIX: Fix settings downtimes on BI aggregates in distributed environment...
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index a0a10bb..bfdcac0 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1960,19 +1960,19 @@ def do_actions(view, what, action_rows, backurl):
for nr, row in enumerate(action_rows):
core_commands, title, executor = core_command(what, row, nr, len(action_rows))
for command_entry in core_commands:
- if (row["site"], command_entry) not in already_executed:
+ site = row.get("site") # site is missing for BI rows (aggregations
can spawn several sites)
+ if (site, command_entry) not in already_executed:
# Some command functions return the information about the site
per-command (e.g. for BI)
if type(command_entry) == tuple:
site, command = command_entry
else:
command = command_entry
- site = row["site"]
if type(command) == unicode:
command = command.encode("utf-8")
executor(command, site)
- already_executed.add((row["site"], command_entry))
+ already_executed.add((site, command_entry))
count += 1
message = None