# Exclude data before multiline?

**URL:** <https://discuss.elastic.co/t/exclude-data-before-multiline/60978>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 20, 2016, 7:33am UTC](https://discuss.elastic.co/t/exclude-data-before-multiline/60978 "2016-09-20T07:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [September 20, 2016, 7:33am UTC](https://discuss.elastic.co/t/exclude-data-before-multiline/60978/1 "2016-09-20T07:33:39Z")

</div>

I use ELK stack + filebeat to collect logs. Log flows in below order.

`filebeat(1.3.0) -> logstash(5.0.0 alpha5) -> elasticsearch(5.0.0alpha5)`

I also use multiline in filebeat to group certain lines.

Problem I am having is multiline worked perfectly until an error log (Hoge : Error : Data is wrong) slipped in between the lines. Below is the sample log.

```
[09:00:41.219593] test 0
[09:00:41.219593] test2 10231
[09:00:41.219718] test3 0
[09:00:41.219718] test4 3679
[09:00:41.219718] test5 0
[09:00:41.219718] test6 924
[09:00:41.219718]
[09:00:41.219718] test7 0
[09:00:41.219718] Hoge : Error : Data is wrong
[09:00:41.220843] test8 8770
[09:00:41.220843] test9 0
[09:00:41.220843] test10 3458
[09:00:41.220843] test11 0
[09:00:41.220843] test12 2372

```

Is there a way to exclude line before multiline takes place in the filebeat?  
[Document](https://www.elastic.co/guide/en/beats/filebeat/master/configuration-filebeat-options.html#exclude-lines) clearly defines exclude takes place after the multiline but I want to implement this.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [September 21, 2016, 8:40am UTC](https://discuss.elastic.co/t/exclude-data-before-multiline/60978/2 "2016-09-21T08:40:14Z")

</div>

There is already an open issue for that here: [https://github.com/elastic/beats/issues/1940](https://github.com/elastic/beats/issues/1940) Currently exclude\_lines is a processor and multiline is a reader. Processors are only applied after the reader finished. It would required some reorganisation. Happy to hear some suggestions on how could solve this issue.

---

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [September 22, 2016, 7:13am UTC](https://discuss.elastic.co/t/exclude-data-before-multiline/60978/3 "2016-09-22T07:13:32Z")

</div>

@ruflin

Understood . Thank you for the reference.

---

<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:** [October 11, 2016, 7:33am UTC](https://discuss.elastic.co/t/exclude-data-before-multiline/60978/4 "2016-10-11T07:33:55Z")

</div>

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