# Unable to extract fields from Message Using GROK Filter

**URL:** <https://discuss.elastic.co/t/unable-to-extract-fields-from-message-using-grok-filter/57366>\
**Category:** Logstash\
**Created:** [August 5, 2016, 3:51pm UTC](https://discuss.elastic.co/t/unable-to-extract-fields-from-message-using-grok-filter/57366 "2016-08-05T15:51:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usman\_Ismail](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/usman_ismail/32/11231_2.png) [@Usman\_Ismail](https://discuss.elastic.co/u/Usman_Ismail)\
**Post date:** [August 5, 2016, 3:51pm UTC](https://discuss.elastic.co/t/unable-to-extract-fields-from-message-using-grok-filter/57366/1 "2016-08-05T15:51:19Z")

</div>

I have a log file collected using a FileBeat that looks like:

`10:21:38.014 DEBUG org.apache.zookeeper.ClientCnxn [main-SendThread(zookeeper3.piranhakik.com:2181)] - Got ping response for sessionid: 0x355bca8e39f0c51 after 0ms`

I have GROK filter which is as follows:

> ```
> filter {
> if [type] == "tigase-kik" {
> grok {
> match => { "message" => "%{TIGASEACCESS}" }
> }
> }
> }
> #pattern file
> KIK_TIMESTAMP HH:mm:ss.SSS
> REMAINING_LOG_MESSAGE (.*)
> TIGASEACCESS %{KIK_TIMESTAMP:timestamp} %{LOGLEVEL:level} %{REMAINING_LOG_MESSAGE}
> 
> ```

But am getting the following error

> {  
> "message" =\> "11:48:08.472 DEBUG c.k.c.p.c.XXXXXX [pool-40-thread-1] - XXXXX XXX XXX XXXX",  
> "@version" =\> "1",  
> "@timestamp" =\> "2016-08-05T15:48:08.859Z",  
> "offset" =\> 101050837,  
> "input\_type" =\> "log",  
> "count" =\> 1,  
> "type" =\> "tigase-kik",  
> "fields" =\> nil,  
> "beat" =\> {  
> "hostname" =\> "[XXX.XXXX.com](http://XXX.XXXX.com)",  
> "name" =\> "[XXXX.XXX.com](http://XXXX.XXX.com)"  
> },  
> "source" =\> "/opt/kik/XXXX/logs/XXXX-XXXX.log",  
> "host" =\> "[XXXX.XXXXX.com](http://XXXX.XXXXX.com)",  
> "tags" =\> [  
> [0] "beats\_input\_codec\_plain\_applied",  
> [1] "\_grokparsefailure"  
> ]  
> }

How do I go about testing the grok definition and any idea whats going wrong for me?

---

<div class="post-metadata">

**Author:** ![apelsina](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@apelsina](https://discuss.elastic.co/u/apelsina)\
**Post date:** [August 5, 2016, 4:44pm UTC](https://discuss.elastic.co/t/unable-to-extract-fields-from-message-using-grok-filter/57366/2 "2016-08-05T16:44:08Z")

</div>

Have you tried the Grok Debugger? [https://grokdebug.herokuapp.com/](https://grokdebug.herokuapp.com/)  
And here are some default grok patterns, it may be helpful [https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns](https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns)

---

<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:** [July 6, 2017, 4:44am UTC](https://discuss.elastic.co/t/unable-to-extract-fields-from-message-using-grok-filter/57366/3 "2017-07-06T04:44:32Z")

</div>


