# Help in grok filter

**URL:** <https://discuss.elastic.co/t/help-in-grok-filter/162220>\
**Category:** Logstash\
**Created:** [December 27, 2018, 10:38am UTC](https://discuss.elastic.co/t/help-in-grok-filter/162220 "2018-12-27T10:38:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustapha\_MJ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mustapha_mj/32/37140_2.png) [@Mustapha\_MJ](https://discuss.elastic.co/u/Mustapha_MJ)\
**Post date:** [December 27, 2018, 10:38am UTC](https://discuss.elastic.co/t/help-in-grok-filter/162220/1 "2018-12-27T10:38:58Z")

</div>

Hello

please help me find the suitable grok filter for IIS server  
the logs are logged as the following format :  
2017-03-07 09:01:05 ::1 GET /Immatriculation/ImmatriculationPM/ImmatriculationPM - 5968 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 302 0 0 7077

and the Fields are :

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken

thanks

---

<div class="post-metadata">

**Author:** ![Mustapha\_MJ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mustapha_mj/32/37140_2.png) [@Mustapha\_MJ](https://discuss.elastic.co/u/Mustapha_MJ)\
**Post date:** [December 27, 2018, 1:31pm UTC](https://discuss.elastic.co/t/help-in-grok-filter/162220/2 "2018-12-27T13:31:25Z")

</div>

ok, i solved the problem

the grok filter is :

filter {  
grok {  
match =\> {"message" =\> "%{TIMESTAMP\_ISO8601:log\_timestamp} %{IPORHOST:site} %{WORD:http\_method} %{URIPATH:page} %{NOTSPACE:query\_string} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:client\_host} %{NOTSPACE:useragent} %{NOTSPACE:Referer} %{NUMBER:http\_response} %{NUMBER:sub\_response} %{NUMBER:sc\_status} %{NUMBER:time\_taken}"}  
}  
}

---

<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:** [January 24, 2019, 1:31pm UTC](https://discuss.elastic.co/t/help-in-grok-filter/162220/3 "2019-01-24T13:31:26Z")

</div>

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