How do I match a newline in grok/logstash?

后端 未结 3 1811
名媛妹妹
名媛妹妹 2020-12-24 06:34

I have a remote machine that combines multiline events and sends them across the lumberjack protocol.

What comes in is something that looks like this:



        
3条回答
  •  独厮守ぢ
    2020-12-24 06:56

    My final grok for Vertica log using (?m) and [^\n]+

    match => ["message","(?m)%{TIMESTAMP_ISO8601:ClientTimestamp}%{SPACE}(%{DATA:Action}:)?(%{DATA:ThreadID} )?(\[%{DATA:Module}\] )?(\<%{DATA:Level}\> )?(\[%{DATA:SubAction}\] )?(@%{DATA:Nodename}:)?( (?(\{.*?\} )?.*?/.*?): )?(?[^\n]+)((\n)?(\t)?(?[^\n]+))?"]
    

    Thanks to asperla

    https://github.com/elastic/logstash/issues/2282

提交回复
热议问题