简体   繁体   English

Logstash中的Grok筛选器错误

[英]Grok Filter Error in Logstash

I have the following in my filter, for some reason it only prints email and not delivery_status. 我的筛选器中包含以下内容,由于某种原因,它仅显示电子邮件,而不显示delivery_status。 But when I comment out the email it then prints the delivery _status. 但是,当我注释掉电子邮件后,它会打印交货状态。

Is there a way to print them both without commenting either of them out? 有没有一种方法可以在不将其中任何一个注释掉的情况下将它们打印出来?

filter {   
    grok {
      patterns_dir => ["/etc/logstash/patterns/postfix"]
      match => { "message" => "%{EMAIL}" }
      match => { "message" => "%{DELIVERY_STATUS}" }
      overwrite => [ "message" ]
    }     

}

Your help would be appreciated. 您的帮助将不胜感激。

By default the grok filter finishes on the first successful match. 默认情况下, grok过滤器在第一个成功匹配时结束。 If you want to overwrite this behaviour, add this line: 如果要覆盖此行为,请添加以下行:

break_on_match => false

For further reference check out the grok filter docs here . 有关更多参考,请在此处查看grok过滤器文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM