# Need grok filter for my custom log files

**URL:** <https://discuss.elastic.co/t/need-grok-filter-for-my-custom-log-files/133821>\
**Category:** Logstash\
**Created:** [May 30, 2018, 8:26am UTC](https://discuss.elastic.co/t/need-grok-filter-for-my-custom-log-files/133821 "2018-05-30T08:26:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sana1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sana1/32/46439_2.png) [@sana1](https://discuss.elastic.co/u/sana1)\
**Post date:** [May 30, 2018, 8:26am UTC](https://discuss.elastic.co/t/need-grok-filter-for-my-custom-log-files/133821/1 "2018-05-30T08:26:58Z")

</div>

I have files in a directory where all log patterns are different, I have successfully configured beats with elastic search but nor being able to filter fields or data

my data in one file of a directory looks like  
"GET / HTTP/1.1  
Host: [yahoo.com](http://yahoo.com)  
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:59.0) Gecko/20100101 Firefox/59.0  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Cookie: B=fh4crrpd9sf94&b=3&s=e1; ucs=lnct=1525329090; HP=1  
Connection: keep-alive  
Upgrade-Insecure-Requests: 1

HTTP/1.1 301 Moved Permanently  
Date: Thu, 07 May 2017 09:48:52 GMT  
Connection: keep-alive  
Via: http/1.1 [media-router-fp1012.prod.media.gq1.yahoo.com](http://media-router-fp1012.prod.media.gq1.yahoo.com) (ApacheTrafficServer [c s f])  
Server: ATS  
Cache-Control: no-store, no-cache  
Content-Type: text/html  
Content-Language: en  
X-Frame-Options: SAMEORIGIN  
Strict-Transport-Security: max-age=2592000  
Location: [https://www.yahoo.com/](https://www.yahoo.com/)  
Content-Length: 8"

and to another file it is different , please help me in parsing my logs

---

<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 27, 2018, 8:27am UTC](https://discuss.elastic.co/t/need-grok-filter-for-my-custom-log-files/133821/2 "2018-06-27T08:27:03Z")

</div>

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