一,前言
默认kibana显示的日志为分行,显示起来非常难看,使用filebeat合并java报错多行日志
二,配置
exclude_lines: ['HEAD']
exclude_lines: ['HTTP/1.1']
multiline.pattern: '^[[:space:]]+(at|\.{3})\b|Exception|捕获异常'
multiline.negate: false
multiline.match: after
说明:
三,日志格式
四,kibana显示结果
五,参考
管理多行消息:https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html
多行配置的实例:https://www.elastic.co/guide/en/beats/filebeat/current/_examples_of_multiline_configuration.html
Filebeat正则表达式支持:https://www.elastic.co/guide/en/beats/filebeat/current/regexp-support.html