# How correctly debug GROK's in logstash

**URL:** https://discuss.elastic.co/t/how-correctly-debug-groks-in-logstash/86289
**Category:** Logstash
**Created:** [May 18, 2017, 2:58pm UTC](https://discuss.elastic.co/t/how-correctly-debug-groks-in-logstash/86289 "2017-05-18T14:58:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Igor\_Gerasimow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_gerasimow/32/18258_2.png) [@Igor\_Gerasimow](https://discuss.elastic.co/u/Igor_Gerasimow)
#### Post date: [May 18, 2017, 2:58pm UTC](https://discuss.elastic.co/t/how-correctly-debug-groks-in-logstash/86289/1 "2017-05-18T14:58:21Z")

</div>

Hello.

I'm sure that my issues is very popular:  
how i can add fields from grok - for example

```auto
2017-05-18 13:52:56 "GET /?method=get_match&match_id=1598784326&region=eune&include_timeline=true HTTP/1.1" 200 1

```

I wand create separate fields for all records

- `status``200`
- `timestamp` `2017-05-18 13:52:56`
- `method` `GET`
- `message` `/?method=get_match&match_id=1598784326&region=eune&include_timeline=true`

seems i create proper grok  
i checked it on [https://grokconstructor.appspot.com/do/match#result](https://grokconstructor.appspot.com/do/match#result)

````auto
%{TIMESTAMP_ISO8601:timestamp} "%{WORD:action} /%{GREEDYDATA:message}%{WORD:protocol}/%{NUMBER:protocolNum}" %{NUMBER:status} %{NUMBER}```

Could you please show proper filter for my needs.
Thank you in advance.
````

---

<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: [May 23, 2017, 3:49am UTC](https://discuss.elastic.co/t/how-correctly-debug-groks-in-logstash/86289/2 "2017-05-23T03:49:28Z")

</div>

And in what way does this not work? Are you getting `_grokparsefailure` tags in your events? Try reducing your grok expression down to the bare minimum (`%{TIMESTAMP_ISO8601:timestamp}`) and build it from there.

---

<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 20, 2017, 3:52am UTC](https://discuss.elastic.co/t/how-correctly-debug-groks-in-logstash/86289/3 "2017-06-20T03:52:22Z")

</div>

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