How to handle non-matching Logstash grok filters

后端 未结 4 1429
孤街浪徒
孤街浪徒 2020-12-12 20:27

I am wondering what the best approach to take with my Logstash Grok filters. I have some filters that are for specific log entries, and won\'t apply to all entries. The on

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 21:14

    You can also add tag_on_failure => [] to your grok stanza like so:

    grok {
        match => ["context", "\"tags\":\[%{DATA:apptags}\]"]
        tag_on_failure => [ ]
    }
    

    grok will still fail, but will do so without adding to the tags array.

提交回复
热议问题