# Flush pattern

**URL:** https://discuss.elastic.co/t/flush-pattern/127509
**Category:** Beats
**Tags:** filebeat
**Created:** [April 10, 2018, 2:55pm UTC](https://discuss.elastic.co/t/flush-pattern/127509 "2018-04-10T14:55:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![las](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@las](https://discuss.elastic.co/u/las)
#### Post date: [April 10, 2018, 2:55pm UTC](https://discuss.elastic.co/t/flush-pattern/127509/1 "2018-04-10T14:55:08Z")

</div>

I am using flush pattern to extract multiline messages. Filebeat seems to be looking for the 1st occurence of the flush pattern to group the lines. Is there a way to have filebeat look for the last occurence of the flush pattern?

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [April 10, 2018, 5:18pm UTC](https://discuss.elastic.co/t/flush-pattern/127509/2 "2018-04-10T17:18:15Z")

</div>

Can you share sample logs and your configuration? Might be easier to help if we get to know about actual problem.

---

<div class="post-metadata">

### Author: ![las](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@las](https://discuss.elastic.co/u/las)
#### Post date: [April 12, 2018, 2:43pm UTC](https://discuss.elastic.co/t/flush-pattern/127509/3 "2018-04-12T14:43:16Z")

</div>

date message  
key value  
key value  
date messageA  
date messageA  
date messageA

The multiline messages start with a message ends with repeating lines that ate very similar.

I am using flush pattern but the problem is that the mesage gets flushed with only the first line and not looking for the last occurence of the flush pattern.

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [April 13, 2018, 11:46am UTC](https://discuss.elastic.co/t/flush-pattern/127509/4 "2018-04-13T11:46:05Z")

</div>

These kind of logs are no use-case for the flush-pattern. Create your multiline pattern to check for the date at the beginning of a line.

---

<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: [May 11, 2018, 11:46am UTC](https://discuss.elastic.co/t/flush-pattern/127509/5 "2018-05-11T11:46:16Z")

</div>

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