# Filebeat multiline works only in pair with logstash

**URL:** <https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191>\
**Category:** Beats\
**Created:** [January 26, 2018, 12:42pm UTC](https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191 "2018-01-26T12:42:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samdocker](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@samdocker](https://discuss.elastic.co/u/samdocker)\
**Post date:** [January 26, 2018, 12:42pm UTC](https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191/1 "2018-01-26T12:42:16Z")

</div>

Hello.  
Weird topic, but this is how see this problem.  
So.  
Currently we are parsing multiline on logstash side. I want to move multiline to filebeat.  
Now.

1. I comment out  
codec =\> multiline {  
...  
}
2. restart logstash
3. Add multiline to filebeat.
4. Restart filebeat.

Result. Does not work and in tags I see **beats\_input\_codec\_plain\_applied**

If I uncomment  
codec =\> multiline {  
...  
}  
and restart logstash

In tags I see **lgs-multiline, beats\_input\_codec\_multiline\_applied**  
**lgs-multiline** is my special tag.

My question. Why with logstash codec =\> multiline filebeats, sort of, works but without it does not?

filebeat multiline config\>

> ```
> multiline.pattern: '^\d{4}-\d{2}-\d{2}[[:space:]]{1,4}\d{2}:\d{2}:\d{2}\.\d{2,4}\+\d{2,4}[[:space:]]{1,4}'
> multiline.negate: true
> multiline.max_lines: 9000
> multiline.match: after
> 
> ```

What is the right configuration for filebeat, in order to process multiline properly?

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [January 26, 2018, 1:34pm UTC](https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191/2 "2018-01-26T13:34:57Z")

</div>

Hi @samdocker,

Could you give some more details on the real and expected output in both cases? An input example is also interesting to check the multiline pattern is correct.

Best regards

---

<div class="post-metadata">

**Author:** ![samdocker](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@samdocker](https://discuss.elastic.co/u/samdocker)\
**Post date:** [January 26, 2018, 2:18pm UTC](https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191/3 "2018-01-26T14:18:18Z")

</div>

Thank you for quick answer.  
I found problem.  
Now it works.  
But I spent 3-4 hours trying to understand what was the problem. But when I asked for help I managed to find solution by my self. 🙂

---

<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:** [February 16, 2018, 12:42pm UTC](https://discuss.elastic.co/t/filebeat-multiline-works-only-in-pair-with-logstash/117191/4 "2018-02-16T12:42:27Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
