# Best Practice for different log files with multi line Grok patterns

**URL:** <https://discuss.elastic.co/t/best-practice-for-different-log-files-with-multi-line-grok-patterns/76623>\
**Category:** Logstash\
**Created:** [February 27, 2017, 1:33pm UTC](https://discuss.elastic.co/t/best-practice-for-different-log-files-with-multi-line-grok-patterns/76623 "2017-02-27T13:33:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohsen\_Sabbaghi](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Mohsen\_Sabbaghi](https://discuss.elastic.co/u/Mohsen_Sabbaghi)\
**Post date:** [February 27, 2017, 1:33pm UTC](https://discuss.elastic.co/t/best-practice-for-different-log-files-with-multi-line-grok-patterns/76623/1 "2017-02-27T13:33:14Z")

</div>

Hi and Respect to all the ELK Gigs !

scenario :  
i have several log files (my app logs, application server logs and...) that each of them contains several different of log patterns in their lines.  
i'm new in ES and i just want to know what is the best practice for my scenario! to collect and parse them ?  
should i parse them only by using one block of multi line Grok pattern ? or use multi Grok pattern block for each individual file ?  
is it necessary to make different elastic nodes for each log file ?

thanks for your help  
tags: #elasticsearch #logstash #grok #multiline\_grok #ELK

---

<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 28, 2017, 2:29pm UTC](https://discuss.elastic.co/t/best-practice-for-different-log-files-with-multi-line-grok-patterns/76623/2 "2017-02-28T14:29:38Z")

</div>

I don't think there's a single best practice here. There are several valid ways of doing it and the best solution depends on the context.

> is it necessary to make different elastic nodes for each log file ?

No, absolutely not.

---

<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, 2017, 2:29pm UTC](https://discuss.elastic.co/t/best-practice-for-different-log-files-with-multi-line-grok-patterns/76623/3 "2017-03-28T14:29:44Z")

</div>

Closed on March 28, 2017, 2:29pm UTC

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