# Filebeat multiline pattern

**URL:** <https://discuss.elastic.co/t/filebeat-multiline-pattern/251274>\
**Category:** Beats\
**Tags:** elastic-stack-monitoring, filebeat\
**Created:** [October 7, 2020, 1:10pm UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern/251274 "2020-10-07T13:10:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhavin\_Varsur](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@Bhavin\_Varsur](https://discuss.elastic.co/u/Bhavin_Varsur)\
**Post date:** [October 7, 2020, 1:10pm UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern/251274/1 "2020-10-07T13:10:22Z")

</div>

![ice_screenshot_20201007-184115](https://us1.discourse-cdn.com/elastic/original/3X/2/3/237354914a465543310d99ad7e29fee450216014.png)

In the picture stacktrace of log message taking the new log line  
I want them in one log.  
How to do that ?

**Here is my log example :**

> 2020-10-01 16:39:18.4120 ERROR LeadsController bhavin [http://bhavin/Leads/New](http://bhavin/Leads/New) POST 192.168.43.244 Provide a valid PhoneNumber.GurukulERP.Logic.InvalidDataException: Provide a valid PhoneNumber.  
> at GurukulERP.API.Controllers.CRM.LeadsController.New(AdmissionLead model) in D:\Git\gbase.API\API\Controllers\CRM\LeadsController.cs:line 474

**here is my multiline pattern:**  
multiline.pattern: '\[1\]'  
multiline.negate: false  
multiline.match: after

* * *

1. [:space:]

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [October 8, 2020, 4:58am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern/251274/2 "2020-10-08T04:58:29Z")

</div>

Hi,

I guess the problem is that the first line of the stacktrace does not start with a space - it starts with a dash sign. There are multiple threads within this forum for multiline support (e.g. [Filebeat multiline regexp patterns help](https://discuss.elastic.co/t/filebeat-multiline-regexp-patterns-help/170648)). Please have a look there. In short:

- change the pattern to match your date-time at the start of the main line
- switch negate to true

Best regards  
Wolfram

---

<div class="post-metadata">

**Author:** ![Bhavin\_Varsur](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@Bhavin\_Varsur](https://discuss.elastic.co/u/Bhavin_Varsur)\
**Post date:** [October 8, 2020, 5:22am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern/251274/3 "2020-10-08T05:22:44Z")

</div>

Hi Wolfram,

I tried and its showing in right way  
Thank you !

---

<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:** [November 5, 2020, 7:22am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern/251274/4 "2020-11-05T07:22:46Z")

</div>

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