filebeat采集日志本身是逐行采集的,如果采集多行,则需要配置,具体看官网,之所以写是因为给自己一个警告,正则匹配后面是不加单引号的。官网上写了单引号,两个星期就因为单引号,两周的时间没了。
- type: log
# Change to true to enable this input configuration.
enabled: true
#路径
paths:
- /var/english.log
#多行配置
multiline.pattern: ^\d{4}-
multiline.negate: true
multiline.match: after
#输出到logstash
output.logstash:
hosts: ["192.168.22.68:5044"]
官网上的一大bug