Module: check_mk
Branch: master
Commit: 85521f78719289ef4c7dca90d486c2acdc73b19e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85521f78719289…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Dec 20 10:23:21 2016 +0100
4207 FIX mk_jolokia: Use configured port as default instance name
Previously, the mk_jolokia plugin would default to the port as
an instance name if no name was configured before reading the
config file. This led to the default instance name always being
8080, regardless of which port was actually configured.
If you have configured a nonstandard port in jolokia.cfg,
but not an instance name, rediscovery is required, as well as
adjusting rules relying on the instance name.
Change-Id: I0ee9508971449b85ad5adb66c8b436c8b07a635e
---
.werks/4207 | 17 +++++++++++++++++
ChangeLog | 2 ++
agents/plugins/mk_jolokia | 5 ++---
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.werks/4207 b/.werks/4207
new file mode 100644
index 0000000..4b9534c
--- /dev/null
+++ b/.werks/4207
@@ -0,0 +1,17 @@
+Title: mk_jolokia: Use configured port as default instance name
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+State: unknown
+Version: 1.4.0i4
+Date: 1482225291
+
+Previously, the mk_jolokia plugin would default to the port as
+an instance name if no name was configured before reading the
+config file. This led to the default instance name always being
+8080, regardless of which port was actually configured.
+
+If you have configured a nonstandard port in jolokia.cfg,
+but not an instance name, rediscovery is required, as well as
+adjusting rules relying on the instance name.
diff --git a/ChangeLog b/ChangeLog
index 3fbf3bf..a72dbea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
* 4171 FIX: perle_psmu: fixed value error...
* 4172 FIX: smart.temp: fixed discovery and check function...
* 4173 FIX: if.include: ignore some more keys in 'Network interfaces and switch
ports' rule which are only used for interface grouping
+ * 4207 FIX: mk_jolokia: Use configured port as default instance name...
+ NOTE: Please refer to the migration notes!
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/agents/plugins/mk_jolokia b/agents/plugins/mk_jolokia
index 22a8a50..4359a1b 100755
--- a/agents/plugins/mk_jolokia
+++ b/agents/plugins/mk_jolokia
@@ -439,12 +439,11 @@ instances = [{}]
conffile = os.getenv("MK_CONFDIR", "/etc/check_mk") +
"/jolokia.cfg"
-if instance == None:
- instance = str(port)
-
if os.path.exists(conffile):
execfile(conffile)
+if instance == None:
+ instance = str(port)
# We have to deal with socket timeouts. Python > 2.6
# supports timeout parameter for the urllib2.urlopen method