logstash-5.x gelfinput多行编解码器不起作用

我有一个简单而直接的configuration,我不知道我在做什么错误试图让这个多行工作。

input { gelf { codec => multiline { pattern => "^%{TIMESTAMP_ISO8601} " negate => true what => "previous" } } } filter {} output { # I have the relevant ES hosts & index here elasticsearch { } stdout { codec => rubydebug } } 

我正在testing它,如下所示,我得到单行,多行标记不会被添加,我看到它在logstashdebugging日志事件通过筛选一个接一个。

 docker run -it --log-driver gelf --log-opt gelf-address=udp://127.0.0.1:12201 \ --log-opt tag=mline-test python:alpine \ python -c 'print("[2017-10-18 00:00:00,000] Hello world");assert False' 
  • 我testing了这两个logstash版本5.5.2和5.6.3 => elasticsearch 5.5
  • 我已经安装了logstash-codec-multiline
  • 我知道我可以用logstash 2.4中的(现在删除的)多行筛选器来做到这一点

我发现在gelfinput插件中忽略了编解码器: logstash-plugins / logstash-input-gelf#37

这意味着gelf唯一的多行选项是使用logstash-2.4并且使单线程性能受到影响。

 Settings: Default pipeline workers: 4 Defaulting pipeline worker threads to 1 because there are some filters that might not work with multiple worker threads {:count_was=>4, :filters=>["multiline"], :level=>:warn} Pipeline main started