# Filebeat Multiline for logs starting in the same way

**URL:** <https://discuss.elastic.co/t/filebeat-multiline-for-logs-starting-in-the-same-way/194587>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 9, 2019, 10:18am UTC](https://discuss.elastic.co/t/filebeat-multiline-for-logs-starting-in-the-same-way/194587 "2019-08-09T10:18:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisa94](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lisa94](https://discuss.elastic.co/u/lisa94)\
**Post date:** [August 9, 2019, 10:18am UTC](https://discuss.elastic.co/t/filebeat-multiline-for-logs-starting-in-the-same-way/194587/1 "2019-08-09T10:18:43Z")

</div>

Hello everybody,  
I'm new to the community and I wanted to ask you a question. I have a log file that is sent to Logstash through Filebeat.  
This log file is composed of lines like this:

> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - Type :chat  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - from :8@srv..in/8  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - to :11@srv..in  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - MID :34B97E83785E  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - TID :CB0A4DA49BA1  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - body :hidden:q1bKTFGyUnJ3zigtVdJRKi5JLCktBgoUpSamAPkllQWpQF5ucTpUphYA  
> 2019.08.09 11:19:22 ERROR [socket\_c2s-thread-3]: android.util.Log - [HttpsUtils] conn.getResponseCode() = 200  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - RISPOSTA:{"ver":"1","err":0,"errd":"","ts":"1565342362","aw":"1"}  
> 2019.08.09 11:19:22 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - MESSAGE : hidden:q1bKTFGyUvLPLcvMVtJRKi5JLCktBgoUpS  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - Type :chat  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - from :8@srv.in/8  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - to :11@srv.in  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - MID :65AD0A4AC022  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - TID :4217AE6787FD  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - body :hidden:q1bKTFGyUvLPLcvMVtJRKi5JLCktBgoUpSamAPkllQWpQF5ucTpUphYA  
> 2019.08.09 11:32:38 ERROR [socket\_c2s-thread-4]: android.util.Log - [HttpsUtils] conn.getResponseCode() = 200  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-4]: com.plugin.apns.ApnsPlugin - RISPOSTA:{"ver":"1","err":0,"errd":"","ts":"1565343158","aw":"1"}  
> 2019.08.09 11:32:38 INFO [socket\_c2s-thread-3]: com.plugin.apns.ApnsPlugin - MESSAGE : hidden:q1bKTFGyUvLPLcvMVtJRKi5JLCktBgoUpSamAPkllQWpQF5ucTpUphY

The log itself it's made up from 8 lines.  
How can I manage this logs with Multiline method? I have some troubles because every line is beginning with a timestamp and I don't know how to merge them in groups of 8 lines.  
Any ideas?

Thank you very much

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [August 9, 2019, 3:24pm UTC](https://discuss.elastic.co/t/filebeat-multiline-for-logs-starting-in-the-same-way/194587/2 "2019-08-09T15:24:09Z")

</div>

Unfortunately, it's not possible to do this using Filebeat. I am not a Logstash export, but I think you can aggregate lines as you wish using Logstash: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html)

---

<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:** [September 6, 2019, 3:24pm UTC](https://discuss.elastic.co/t/filebeat-multiline-for-logs-starting-in-the-same-way/194587/3 "2019-09-06T15:24:12Z")

</div>

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