本文介绍了2个编解码器在一个过滤器模块中用于logstash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想问问关于过滤器插件的问题我使用的是logstash 5.0.0 alpha4
我在某种情况下,我必须在单个文件模块中设置多行编解码器和纯编解码器。
这似乎不起作用,因为logstash不能识别纯编解码器。
file {
path = > [/ var / log / logstash / data / log / g_02 / * / always / *]
start_position => 开始
codec =>多行{
pattern => ---------------------- \ + | Present Rot \ [360deg\] | Total Rot \ [360deg\]
negate => false
what =>以前的
}
codec => plain {
charset => ISO-8859-1
}
我的配置是否错误?
解决方案
目前这是不可能的。有一个开放的问题:
I would like to ask question about filter plugin
I am using logstash 5.0.0 alpha4
I am in a situation where I have to set multiline codec and plain codec in single file module.This seems to not work since logstash is not recognizing the plain codec.
file {
path => ["/var/log/logstash/data/log/g_02/*/always/*"]
start_position => "beginning"
codec => multiline {
pattern => "----------------------\+|Present Rot \[360deg\]|Total Rot \[360deg\] "
negate => false
what => previous
}
codec => plain {
charset => "ISO-8859-1"
}
Is my configuration wrong?
解决方案
Currently this is not possible. There is an open issue about this: https://logstash.jira.com/browse/LOGSTASH-1723
这篇关于2个编解码器在一个过滤器模块中用于logstash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!