filebeat 7.4.0采集多行日志

 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

发布了240 篇原创文章 · 获赞 435 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/fjxcsdn/article/details/102961302