Module: check_mk
Branch: master
Commit: 97e73e4f2645fb2991fc0919098391dd3b839183
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97e73e4f2645fb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 22 15:44:50 2016 +0200
3762 FIX local: Fixed long output handling with Microcore
Escaped \n characters will now be interpreted correctly when using the Microcore.
---
.werks/3762 | 9 +++++++++
ChangeLog | 1 +
checks/local | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/.werks/3762 b/.werks/3762
new file mode 100644
index 0000000..9475016
--- /dev/null
+++ b/.werks/3762
@@ -0,0 +1,9 @@
+Title: local: Fixed long output handling with Microcore
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1471873450
+Class: fix
+
+Escaped \n characters will now be interpreted correctly when using the Microcore.
diff --git a/ChangeLog b/ChangeLog
index 58147a2..c7d049e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -344,6 +344,7 @@
* 3782 FIX: agent_netapp: fixed exception with values containing umlauts
* 3774 FIX: apc_symmetra: fixed wrong status and values handling
* 3761 FIX: windows_tasks: Fixed possible exception in discovery in case of
unexpected agent data
+ * 3762 FIX: local: Fixed long output handling with Microcore...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/local b/checks/local
index 58bf27e..468eb97 100644
--- a/checks/local
+++ b/checks/local
@@ -116,7 +116,12 @@ def check_local(item, params, info):
statechar = line[0]
perftxt = line[2]
+
output = " ".join(line[3:])
+ # convert eventually escaped newline chars to real newlines
+ # (will be converted back later individually for the different cores)
+ output = output.replace("\\n", "\n")
+
perfdata = []
if perftxt != "-":
# new: allow multiple perfdata by using | as separator