# Add\_tag upon max\_lines reached in multiline

**URL:** <https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 8, 2016, 8:24pm UTC](https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254 "2016-06-08T20:24:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![whyapenny](https://avatars.discourse-cdn.com/v4/letter/w/90db22/32.png) [@whyapenny](https://discuss.elastic.co/u/whyapenny)\
**Post date:** [June 8, 2016, 8:24pm UTC](https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254/1 "2016-06-08T20:24:16Z")

</div>

So I am processing xml using filebeat. If an entry is longer than the allowed max\_lines, the xml is incomplete, and thus invalid xml. Therefore the xml parser filter fails on these records. I was hoping to add a tag to records that reached the max\_lines so i can add logic to avoid the xml filter for records who will receive \_xmlparsefailure and, hopefully, perform more efficiently.

---

<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:** [June 9, 2016, 10:47am UTC](https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254/2 "2016-06-09T10:47:34Z")

</div>

@whyapenny Can you open a feature request for this in the Github repository?

We have one more feature request of adding a tag related to multiline here: [https://github.com/elastic/beats/issues/957](https://github.com/elastic/beats/issues/957) not the same but potentially could be done in an implementation together.

---

<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:** [June 9, 2016, 1:59pm UTC](https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254/3 "2016-06-09T13:59:52Z")

</div>

you still want to receive events with incomplete xml? Maybe one can use a clever combination of `include_lines` and `exclude_lines` in filebeat so not to send those incomplete events to logstash at all.

---

<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:** [June 29, 2016, 8:24pm UTC](https://discuss.elastic.co/t/add-tag-upon-max-lines-reached-in-multiline/52254/4 "2016-06-29T20:24:25Z")

</div>

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