Browse Source

[filebeat] Add json parsing to filebeat

Colin Powell 3 years ago
parent
commit
589b52541f
1 changed files with 8 additions and 0 deletions
  1. 8 0
      ansible/roles/filebeat/files/filebeat.yml

+ 8 - 0
ansible/roles/filebeat/files/filebeat.yml

@@ -4,6 +4,14 @@ filebeat.inputs:
     paths:
       - "/var/log/*.log"
     exclude_lines: [".*mdnsd.*", ".*syslogd.*"]
+  - type: filestream
+    enabled: true
+    paths:
+      - "/var/log/*.json"
+    fields_under_root: true
+    json.message_key: message
+    fields:
+      tags: ["json"]
 
 filebeat.config.modules:
   path: ${path.config}/filebeat.modules.d/*.yml