# How can i use logstash to process custom log?

**URL:** <https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694>\
**Category:** Logstash\
**Created:** [May 21, 2018, 8:08pm UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694 "2018-05-21T20:08:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anilkumar\_Patel](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Anilkumar\_Patel](https://discuss.elastic.co/u/Anilkumar_Patel)\
**Post date:** [May 21, 2018, 8:08pm UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/1 "2018-05-21T20:08:56Z")

</div>

Hi, I am new to the logstash and elasticsearch and I don't know how to process these below logs.

fields in the log file are source, method, date & logmessage.

Source : abcd.cs  
Method : abcd()  
Date : 15/05/2018 00:00:13  
LogMessage : failed to connect

Source : wxyz.cs  
Method : wxyz()  
Date : 15/05/2018 00:00:13  
LogMessage : failed to connect.

and I need output should be in

abcd.cs abcd() 15/05/2018 00:00:13 failed to connect

so that I can apply the grok filter for the further parsing of the logs.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 21, 2018, 11:34pm UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/2 "2018-05-21T23:34:14Z")

</div>

Are these on a Windows server, are they in the event log or in a file?

---

<div class="post-metadata">

**Author:** ![Anilkumar\_Patel](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Anilkumar\_Patel](https://discuss.elastic.co/u/Anilkumar_Patel)\
**Post date:** [May 22, 2018, 4:53am UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/3 "2018-05-22T04:53:55Z")

</div>

hi mark, its a .txt file generated from an application

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 22, 2018, 5:36am UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/4 "2018-05-22T05:36:01Z")

</div>

Then you can use Filebeat with the multiline functionality - [https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html](https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html)

---

<div class="post-metadata">

**Author:** ![Anilkumar\_Patel](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Anilkumar\_Patel](https://discuss.elastic.co/u/Anilkumar_Patel)\
**Post date:** [May 22, 2018, 6:53am UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/5 "2018-05-22T06:53:41Z")

</div>

Hi Mark,  
Thanks for the reply. I have found the solution using Filebeat with multiline functionality.

It would be really nice if I could get one more help. I was using the Logstash S3 input plugin, but I have been struggling to implement it. I created a discuss issue but haven't got any replies. Could you please take a look at it and share your inputs.

link:- [Require example/tutorial for Logstash S3 Input Plugin](https://discuss.elastic.co/t/require-example-tutorial-for-logstash-s3-input-plugin/131907)

Thanks,  
Anil

---

<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 19, 2018, 6:53am UTC](https://discuss.elastic.co/t/how-can-i-use-logstash-to-process-custom-log/132694/6 "2018-06-19T06:53:50Z")

</div>

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