# Multiline section?

**URL:** <https://discuss.elastic.co/t/multiline-section/92330>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 7, 2017, 8:42pm UTC](https://discuss.elastic.co/t/multiline-section/92330 "2017-07-07T20:42:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jxm0983](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jxm0983](https://discuss.elastic.co/u/jxm0983)\
**Post date:** [July 7, 2017, 8:42pm UTC](https://discuss.elastic.co/t/multiline-section/92330/1 "2017-07-07T20:42:06Z")

</div>

I'm wanting to prepend one line onto each future line, each of which should be shipped separately to Logstash. I haven't been able to find anything that looked like this in the documentation.

The "log" that I'm parsing is broken into sections, i.e.:  
servername 1  
line 1  
line 2  
...  
servername 2  
line 1  
line 2  
...  
What I'd like to do is have the server name prepended to each of the following lines, until another matching servername "start" line is found. To be clear, I want each of the other lines to be a separate message into Logstash, but each should contain the server name that preceded the section.  
Is carrying forward a variable like this something that multiline can already do, or would this be an opportunity for an enhancement request?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [July 7, 2017, 9:41pm UTC](https://discuss.elastic.co/t/multiline-section/92330/2 "2017-07-07T21:41:18Z")

</div>

You could use the multiline feature in Filebeat to group the related logs lines together into a single event. Then send the data to Logstash where you would apply a grok filter to parse the server name from the message, then apply a [split filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html) to break the event apart.

---

<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:** [August 4, 2017, 9:41pm UTC](https://discuss.elastic.co/t/multiline-section/92330/3 "2017-08-04T21:41:40Z")

</div>

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