Module: check_mk
Branch: master
Commit: 10f3ef29cb1a7d7aacc43c50c4191a7b8c3527c5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10f3ef29cb1a7d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 14 10:01:27 2018 +0200
6065 FIX fileinfo.groups: Fixed broken discovery "Invalid output from webservice
(malformed string)"
When this check was used to create a grouped file check and rediscovered with 1.5.*, this
lead
to an error message like "Invalid output from webservice (malformed string)".
Change-Id: I965f7ab26d59cc144f0e8aab0bdab576924e2b17
---
.werks/6065 | 12 ++++++++++++
checks/fileinfo | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6065 b/.werks/6065
new file mode 100644
index 0000000..b5c30d3
--- /dev/null
+++ b/.werks/6065
@@ -0,0 +1,12 @@
+Title: fileinfo.groups: Fixed broken discovery "Invalid output from webservice
(malformed string)"
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1526284756
+
+When this check was used to create a grouped file check and rediscovered with 1.5.*, this
lead
+to an error message like "Invalid output from webservice (malformed string)".
diff --git a/checks/fileinfo b/checks/fileinfo
index 1ddac54..2b743e1 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -103,7 +103,8 @@ def fileinfo_groups_get_group_name(group_patterns, filename,
reftime):
found_these_groups.setdefault(this_group_name, set())
found_these_groups[this_group_name].add(this_pattern)
- return found_these_groups
+ # Convert pattern containers to lists (sets are not possible in autochecks)
+ return dict([ (k, list(v)) for k, v in found_these_groups.items() ])
def inventory_fileinfo_common(info, case):