# Multiline FIlebeat configuration for custom log

**URL:** <https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 16, 2017, 9:07am UTC](https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301 "2017-02-16T09:07:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prosenjit](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@prosenjit](https://discuss.elastic.co/u/prosenjit)\
**Post date:** [February 16, 2017, 9:07am UTC](https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301/1 "2017-02-16T09:07:22Z")

</div>

Hi , I have successfully set up real time centralized logging. The only issue that remains is the custom logs. It has mutiple lines for a single event. Since my shipper(filebeat) sends these logs to the buffer(Redis), I need to handle these multi line events in the filebeat end and not in the logstash end. Here is how the log lines look

1/11/2017 12:00:17 AM :  
Error thrown is:  
No Error

* * *

Request sent is:  
webMethod:GetOSSUpdatedOrderHeader|appCode:OSS|regionCode:EMEA|orderKeyList:|lastModifedDateTime:1/10/2017 11:59:13 PM|

* * *

1/11/2017 12:00:23 AM :  
Error thrown is:  
No Error

* * *

Request sent is:  
webMethod:GetOSSUpdatedOrderHeader|appCode:OSS|regionCode:APJ|orderKeyList:|lastModifedDateTime:1/10/2017 11:58:17 PM|

* * *

and here is the filebeat.yml config:

exclude\_lines: ["^\*"]  
multiline.pattern: "(\d{1,2})/(\d{1,2})/(\d{4})(\d{2}):(\d{2}):(\d{2})\s(AM|PM]\s:"  
multiline.negate: true  
multiline.match: after

I have tried several other patterns to let filebeat know that the date field is where I want the new event to start from. However, I get the entire event being made into a single line all the time.'Please help me out here

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 16, 2017, 2:34pm UTC](https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301/2 "2017-02-16T14:34:36Z")

</div>

Using single quotes when writing regular expressions in your config file. Take a look at the tester where I modified your expression: [https://play.golang.org/p/Mw9Mq1Some](https://play.golang.org/p/Mw9Mq1Some)

[https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html](https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html)

---

<div class="post-metadata">

**Author:** ![prosenjit](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@prosenjit](https://discuss.elastic.co/u/prosenjit)\
**Post date:** [February 17, 2017, 11:00am UTC](https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301/3 "2017-02-17T11:00:39Z")

</div>

@andrewkroh Thanks a ton, I had been breaking head on this one for quite a while!!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2017, 11:01am UTC](https://discuss.elastic.co/t/multiline-filebeat-configuration-for-custom-log/75301/4 "2017-03-17T11:01:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
