Module: check_mk
Branch: master
Commit: 8edbad64016d5f81b2844bf2127a13bdce8d3953
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8edbad64016d5f…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Jun 16 09:10:14 2016 +0200
3144 FIX bugfix: replacing pipe symbol in plugin output was broken
---
.werks/3144 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/3144 b/.werks/3144
new file mode 100644
index 0000000..cae5214
--- /dev/null
+++ b/.werks/3144
@@ -0,0 +1,10 @@
+Title: bugfix: replacing pipe symbol in plugin output was broken
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1466060960
+
+
diff --git a/ChangeLog b/ChangeLog
index b2b92fc..2a6f4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -272,6 +272,7 @@
* 3637 FIX: ipmi_sensors: fixed sensor discovery if sensor is unknown and perfdata handling
* 3545 FIX: netapp_api_vs_traffic: fixed crash when NFSv4.1 information was available
* 3143 FIX: windows agent: fixed some minor memory and handle leaks
+ * 3144 FIX: bugfix: replacing pipe symbol in plugin output was broken
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index fc63a14..b0cbad7 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1919,7 +1919,7 @@ def submit_check_result(host, servicedesc, result, sa, cached_at=None, cache_int
# make sure that plugin output does not contain a vertical bar. If that is the
# case then replace it with a Uniocode "Light vertical bar"
- infotext = infotext.replace("|", "\u2758")
+ infotext = infotext.replace("|", u"\u2758".encode("utf8"))
# Aggregated service -> store for later
if sa != "":
Module: check_mk
Branch: master
Commit: 78b732305460c31fb21c972f8d41da20199da4cd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=78b732305460c3…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 15 14:39:19 2016 +0200
3546 Drastically sped up response time on querying single aggregations
Querying a single aggregation (e.g. through <i>Filter: Aggregation name (exact match)</i>) took
considerably longer than it should. The query time was proportional to the number of
available aggregations. This has been fixed.
The main beneficiary of this fix is the active check "Check State of BI Aggregation".
---
.werks/3546 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/bi.py | 9 ++++++++-
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.werks/3546 b/.werks/3546
new file mode 100644
index 0000000..a4e202b
--- /dev/null
+++ b/.werks/3546
@@ -0,0 +1,13 @@
+Title: Drastically sped up response time on querying single aggregations
+Level: 1
+Component: bi
+Compatible: compat
+Version: 1.4.0i1
+Date: 1465993843
+Class: feature
+
+Querying a single aggregation (e.g. through <i>Filter: Aggregation name (exact match)</i>) took
+considerably longer than it should. The query time was proportional to the number of
+available aggregations. This has been fixed.
+
+The main beneficiary of this fix is the active check "Check State of BI Aggregation".
diff --git a/ChangeLog b/ChangeLog
index dde3338..b2b92fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -455,6 +455,7 @@
* 3271 New option in aggregation for tuning aggregation of downtimes...
* 3396 Change default setting of Precompile aggregations on demand to ON now...
* 3449 The host alias can now be used in BI aggregates...
+ * 3546 Drastically sped up response time on querying single aggregations...
* 3247 FIX: Do not allow multiple BI aggregates with the same title...
* 3232 FIX: BI: Only querying site of host for specific host status info...
* 3291 FIX: Improved error handling when searching for BI aggregations with invalid regex
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 9bcb290..0f85da5 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1872,6 +1872,7 @@ def table(columns, add_headers, only_sites, limit, filters):
# later out again.
only_group = None
only_service = None
+ only_aggr_name = None
for filter in filters:
if filter.name == "aggr_group":
@@ -1880,6 +1881,10 @@ def table(columns, add_headers, only_sites, limit, filters):
only_group = val
elif filter.name == "aggr_service":
only_service = filter.service_spec()
+ elif filter.name == "aggr_name":
+ only_aggr_name = filter.value().get("aggr_name")
+ # TODO: can be further improved by filtering aggr_name_regex
+ # See BITextFilter(Filter): filter_table(self, rows)
if config.bi_precompile_on_demand and only_group:
# optimized mode: if aggregation group known only precompile this one
@@ -1901,7 +1906,6 @@ def table(columns, add_headers, only_sites, limit, filters):
entries.append(aggr)
by_groups[group] = entries
items = by_groups.items()
-
else:
items = g_user_cache["forest"].items()
@@ -1910,6 +1914,9 @@ def table(columns, add_headers, only_sites, limit, filters):
continue
for tree in trees:
+ if only_aggr_name and only_aggr_name != tree.get("title"):
+ continue
+
row = create_aggregation_row(tree)
row["aggr_group"] = group
rows.append(row)