Module: check_mk
Branch: master
Commit: bbf2e2be92048079b0d3e99c2efc3419dbf0b90f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbf2e2be920480…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Jul 31 15:38:21 2017 +0200
4802 mk_jolokia: Can now be configured to use the local machine's FQDN to access Jolokia
Previously, the Jolokia server could be configured via an IP address or an explicit FQDN.
When using HTTPS on a large number of devices, configuring "localhost" or 127.0.0.1
would lead to certificate errors unless one configured the FQDN for each host individually.
This is unreasonably tedious, and can be avoided using this feature.
Change-Id: I786ba5170f4cd8e06cda8fa2191a0a49c26c289b
---
.werks/4802 | 13 +++++++++++++
agents/plugins/mk_jolokia | 6 ++++++
2 files changed, 19 insertions(+)
diff --git a/.werks/4802 b/.werks/4802
new file mode 100644
index 0000000..ba0045d
--- /dev/null
+++ b/.werks/4802
@@ -0,0 +1,13 @@
+Title: mk_jolokia: Can now be configured to use the local machine's FQDN to access Jolokia
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1501508004
+Class: feature
+
+Previously, the Jolokia server could be configured via an IP address or an explicit FQDN.
+When using HTTPS on a large number of devices, configuring "localhost" or 127.0.0.1
+would lead to certificate errors unless one configured the FQDN for each host individually.
+This is unreasonably tedious, and can be avoided using this feature.
diff --git a/agents/plugins/mk_jolokia b/agents/plugins/mk_jolokia
index f00f606..dc0353f 100755
--- a/agents/plugins/mk_jolokia
+++ b/agents/plugins/mk_jolokia
@@ -478,6 +478,9 @@ conffile = os.getenv("MK_CONFDIR", "/etc/check_mk") + "/jolokia.cfg"
if os.path.exists(conffile):
execfile(conffile)
+if server = "use fqdn":
+ server = socket.getfqdn()
+
if instance == None:
instance = str(port)
@@ -514,4 +517,7 @@ for inst in instances:
inst["instance"] = str(inst["port"])
inst["instance"] = inst["instance"].replace(" ", "_")
+ if inst.get("server") == "use fqdn":
+ inst["server"] == socket.getfqdn()
+
query_instance(inst)
Module: check_mk
Branch: master
Commit: 64a023090f0c190616c0e675f329f862aa35b508
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=64a023090f0c19…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 28 12:06:12 2017 +0200
5047 FIX EC views: Fixed "Events of host X" views of unrelated events
When clicking on the host name of an unrelated event (one that has no host in the monitoring core)
the target page was not showing any event since Check_MK 1.4. The events are now correctly filtered
by the original event host instead of the host name of the found core host.
Change-Id: Ib61ae1c3f955845aa0fdfde1ac8c272717605707
---
.werks/5047 | 12 ++++++++++++
web/htdocs/views.py | 17 +++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/.werks/5047 b/.werks/5047
new file mode 100644
index 0000000..5923403
--- /dev/null
+++ b/.werks/5047
@@ -0,0 +1,12 @@
+Title: EC views: Fixed "Events of host X" views of unrelated events
+Level: 1
+Component: ec
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1501236224
+Class: fix
+
+When clicking on the host name of an unrelated event (one that has no host in the monitoring core)
+the target page was not showing any event since Check_MK 1.4. The events are now correctly filtered
+by the original event host instead of the host name of the found core host.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 08da98a..ab7822f 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1504,6 +1504,22 @@ def show_view(view, show_heading = False, show_buttons = True,
if html.has_var('servicegroup') and not html.has_var("optservice_group"):
html.set_var("optservice_group", html.var("servicegroup"))
+ # TODO: Another hack :( Just like the above one: When opening the view "ec_events_of_host",
+ # which is of single context "host" using a host name of a unrelated event, the list of
+ # events is always empty since the single context filter "host" is sending a "host_name = ..."
+ # filter to livestatus which is not matching a "unrelated event". Instead the filter event_host
+ # needs to be used.
+ # Another idea: We could change these views to non single context views, but then we would not
+ # be able to show the buttons to other host related views, which is also bad. So better stick
+ # with the current mode.
+ if view["datasource"] in [ "mkeventd_events", "mkeventd_history" ] and "host" in view["single_infos"]:
+ # Remove the original host name filter
+ use_filters = [ f for f in use_filters if f.name != "host" ]
+
+ # Set the value for the event host filter
+ if not html.has_var("event_host"):
+ html.set_var("event_host", html.var("host"))
+
# Now populate the HTML vars with context vars from the view definition. Hard
# coded default values are treated differently:
#
@@ -1514,6 +1530,7 @@ def show_view(view, show_heading = False, show_buttons = True,
# Check that all needed information for configured single contexts are available
visuals.verify_single_contexts('views', view, datasource.get('link_filters', {}))
+
# Prepare Filter headers for Livestatus
# TODO: When this is used by the reporting then *all* filters are
# active. That way the inventory data will always be loaded. When