How to process multiline log entry with logstash filter?

后端 未结 4 1439
终归单人心
终归单人心 2020-12-14 01:26

Background:

I have a custom generated log file that has the following pattern :

[2014-03-02 17:34:20] - 127.0.0.1|ERROR| E:\\xampp\\htdocs\\test.ph         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-14 02:00

    grok and multiline handling is mentioned in this issue https://logstash.jira.com/browse/LOGSTASH-509

    Simply add "(?m)" in front of your grok regex and you won't need mutation. Example from issue:

    pattern => "(?m)<%{POSINT:syslog_pri}>(?:%{SPACE})%{GREEDYDATA:message_remainder}"
    

提交回复
热议问题