为什么 logstash "multiline" 过滤器不能正常工作?
why logstash "multiline" filter didn't work correctly?
这是我的配置文件:
input{
redis{
data_type => "list"
key => "aas-redis-logback"
host => "my redis host"
port => "6379"
password => "my redis password"
# threads => 5
}
stdin{}
}
filter{
multiline{
pattern => "^\[AAS\]"
negate => true
what => "previous"
}
}
output{
elasticsearch{
hosts => "168.2.8.88:9200"
index => "0814-multi-test"
}
stdout{codec => rubydebug}
}
这是我的日志文件:
这是我的输出:
多行过滤器的"pattern"似乎不起作用,所有的日志消息都被放在一起了。
为什么?
将 true 更改为 "true"。
然后就变成了
multiline{
pattern => "^\[AAS\]"
negate => "true"
what => "previous"
}
它工作正常。
这是我的配置文件:
input{
redis{
data_type => "list"
key => "aas-redis-logback"
host => "my redis host"
port => "6379"
password => "my redis password"
# threads => 5
}
stdin{}
}
filter{
multiline{
pattern => "^\[AAS\]"
negate => true
what => "previous"
}
}
output{
elasticsearch{
hosts => "168.2.8.88:9200"
index => "0814-multi-test"
}
stdout{codec => rubydebug}
}
这是我的日志文件:
这是我的输出:
多行过滤器的"pattern"似乎不起作用,所有的日志消息都被放在一起了。 为什么?
将 true 更改为 "true"。 然后就变成了
multiline{
pattern => "^\[AAS\]"
negate => "true"
what => "previous"
}
它工作正常。