多行 Filebeat 模板不适用于 filebeat.inputs - 类型:filestream

问题描述

当filebeat.inputs:参数指定type:filestream时,我在Filebeat中遇到了多行处理问题 - 文件流的日志没有按照多行的要求进行分析。模式:'^[[0-9]{4}-[0-9]{2}-[0-9]{2}',在输出中,我看到行没有添加到行中,是使用日志文件中的各个行创建了新的单行消息。

如果指定 type: 登录文件 bat.inputs: 参数,则一切正常,符合 multiline 的要求。模式:'^[[0-9]{4}-[0-9]{2}-[0-9]{2}' - 创建多行消息。

我的配置中没有正确指定什么?

filebeat.inputs:
 
     - type: filestream
 
       enabled: true
 
       paths:
         - C:\logs\GT\TTL\*\*.log
       fields_under_root: true
       fields:
         instance: xml
         system: ttl
         subsystem: GT
         account: abc
       multiline.type: pattern
       multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'
       multiline.negate: true
       multiline.match: after

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)