Module: check_mk
Branch: master
Commit: ba179bd45cf091c266214f907b999034bb09f7fe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba179bd45cf091…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Mar 5 12:57:52 2018 +0100
5710 FIX jolokia_generic.string: Fix broken parameter handling
Previously, any strings against which to match would be ignored. This has been fixed.
Thanks to Alexander Hotz for the patch!
Change-Id: I397eceeb113ce83904fca4f5e84b8776fbdbf017
---
.werks/5710 | 13 +++++++++++++
checks/jolokia_generic | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/5710 b/.werks/5710
new file mode 100644
index 0000000..2f008d5
--- /dev/null
+++ b/.werks/5710
@@ -0,0 +1,13 @@
+Title: jolokia_generic.string: Fix broken parameter handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i4
+Date: 1520250977
+
+Previously, any strings against which to match would be ignored. This has been fixed.
+
+Thanks to Alexander Hotz for the patch!
diff --git a/checks/jolokia_generic b/checks/jolokia_generic
index bf39f21..fdccfbe 100644
--- a/checks/jolokia_generic
+++ b/checks/jolokia_generic
@@ -64,7 +64,7 @@ def check_jolokia_generic_string(item, params, parsed):
value = parsed[item]["value"]
default_status = params.get("default_status", 0)
- search_strings = params.get("search_strings", [])
+ search_strings = params.get("match_strings", [])
for search_string, status in search_strings:
if search_string in value:
return status, "%s: %s matches" % (value, search_string)