From 2a11f9f2423c4e030badd237d1d328357dddece9 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sun, 16 May 2021 21:14:36 +0300
Subject: [PATCH] Decode JSON logs.

---
 filebeat/filebeat.yml       |  4 ++++
 journalbeat/journalbeat.yml | 10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/filebeat/filebeat.yml b/filebeat/filebeat.yml
index 1f59819..b76571b 100644
--- a/filebeat/filebeat.yml
+++ b/filebeat/filebeat.yml
@@ -13,6 +13,10 @@ http:
 processors:
   - add_host_metadata: ~
   - add_docker_metadata: ~
+  - decode_json_fields:
+    fields:
+      - message
+    add_error_key: true
 
 filebeat.inputs:
   - type: container
diff --git a/journalbeat/journalbeat.yml b/journalbeat/journalbeat.yml
index 69fdf7a..e4aa166 100644
--- a/journalbeat/journalbeat.yml
+++ b/journalbeat/journalbeat.yml
@@ -10,9 +10,13 @@ logging:
 http:
   enabled: true
 
+processors:
+  - add_host_metadata: ~
+  - decode_json_fields:
+    fields:
+      - message
+    add_error_key: true
+
 journalbeat.inputs:
   - paths: []
     seek: cursor
-
-processors:
-  - add_host_metadata: ~
-- 
GitLab