# Logstash - Receive event including line feeds

**URL:** <https://discuss.elastic.co/t/logstash-receive-event-including-line-feeds/121897>\
**Category:** Logstash\
**Created:** [February 28, 2018, 4:44pm UTC](https://discuss.elastic.co/t/logstash-receive-event-including-line-feeds/121897 "2018-02-28T16:44:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadus](https://avatars.discourse-cdn.com/v4/letter/v/919ad9/32.png) [@Vadus](https://discuss.elastic.co/u/Vadus)\
**Post date:** [February 28, 2018, 4:44pm UTC](https://discuss.elastic.co/t/logstash-receive-event-including-line-feeds/121897/1 "2018-02-28T16:44:03Z")

</div>

Hi folks,

I try to read an event in Logstash, received via tcp. This event contains line feeds and unfortunately at the logstash filter, where I try to remove the linefeeds via mutate/gsub, I already receive each line one by one as single events. How can I make the logstash input clear, that the entire tcp payload should be treated as one event containing a message with line feeds ?

BR,  
Danny

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 28, 2018, 5:53pm UTC](https://discuss.elastic.co/t/logstash-receive-event-including-line-feeds/121897/2 "2018-02-28T17:53:40Z")

</div>

The [tcp input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-tcp.html) treats each line as an event. You might be able to combine them using a multiline codec with an auto\_flush\_interval. Or perhaps you could find a way to use an http input plugin instead.

---

<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:** [March 28, 2018, 5:54pm UTC](https://discuss.elastic.co/t/logstash-receive-event-including-line-feeds/121897/3 "2018-03-28T17:54:15Z")

</div>

Closed on March 28, 2018, 5:54pm UTC

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