# Add 'multiline' to tags field

**URL:** <https://discuss.elastic.co/t/add-multiline-to-tags-field/41285>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 9, 2016, 2:38pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285 "2016-02-09T14:38:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![incogniro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incogniro/32/5875_2.png) [@incogniro](https://discuss.elastic.co/u/incogniro)\
**Post date:** [February 9, 2016, 2:38pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/1 "2016-02-09T14:38:41Z")

</div>

The logstash multiline plugin adds the value 'multiline' to tags. Then it is possible to perform additional processing of such events:

`
if 'multiline' in [tags] {
 ....
}
` Are there plans to add this into Filebeat?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 9, 2016, 2:42pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/2 "2016-02-09T14:42:32Z")

</div>

I'm curious, what conditional extra processing do you perform _just_ because the line was joined from multiple physical lines?

---

<div class="post-metadata">

**Author:** ![incogniro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incogniro/32/5875_2.png) [@incogniro](https://discuss.elastic.co/u/incogniro)\
**Post date:** [February 9, 2016, 2:44pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/3 "2016-02-09T14:44:21Z")

</div>

```
if 'multiline' in [tags] {
  mutate { # Replace all new line characters with a label.
    gsub => ['[@metadata][message]', '\n', '<<NEWLINE>>' ] 
  }
} 

```

The newline characters are replaced with a label which another system uses to parse the line.

---

<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:** [February 9, 2016, 10:59pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/4 "2016-02-09T22:59:15Z")

</div>

Feel free to add an enhancement request to github.com/elastic/beats. Some indicator to flag merged lines totally makes sense.

---

<div class="post-metadata">

**Author:** ![incogniro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incogniro/32/5875_2.png) [@incogniro](https://discuss.elastic.co/u/incogniro)\
**Post date:** [February 10, 2016, 12:58pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/5 "2016-02-10T12:58:17Z")

</div>

[Enhancement](https://github.com/elastic/beats/issues/957) to include indication of a multiline has been [recorded](https://github.com/elastic/beats/issues/957).

---

<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:** [July 5, 2017, 9:55pm UTC](https://discuss.elastic.co/t/add-multiline-to-tags-field/41285/6 "2017-07-05T21:55:51Z")

</div>


