# Not able to give "unknown" field name in grok filter

**URL:** https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198
**Category:** Logstash
**Created:** [June 1, 2020, 3:14pm UTC](https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198 "2020-06-01T15:14:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sakthiskv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sakthiskv/32/70155_2.png) [@sakthiskv](https://discuss.elastic.co/u/sakthiskv)
#### Post date: [June 1, 2020, 3:14pm UTC](https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198/1 "2020-06-01T15:14:19Z")

</div>

Hai,  
i am using logstash IMAP server to read messages from mail and put it into ES. I am able to read mails from Gmail and getting mail attachments also. i have to apply some filter to that attachments field. but that field look like UNKNOWN type.  
So i am not able to give that field in grok filter. i am not getting any error but getting tag "\_grokparsefailure". I already cross checked grok filter with default field . its working fine .  
If i am giving unknown field its not working .

Plz help me, Thanks

I attached that unknown field with data(img) below.

 ![logstash](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7cd95eb6c5eeec2d4db2be92b9fbd4cbdbf1fe07.png)

And also i attached my filter conf.

filter {  
grok {  
patterns\_dir =\> ["C:\logstash\vendor\bundle\jruby\2.5.0\gems\logstash-patterns-core-4.1.2\patterns\extra.rb"]  
match =\> { 'attachments' =\> "%{ATTACHMENT\_DATA}"}  
}  
}

---

<div class="post-metadata">

### Author: ![andres-perez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres-perez/32/136461_2.png) [@andres-perez](https://discuss.elastic.co/u/andres-perez)
#### Post date: [June 1, 2020, 8:29pm UTC](https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198/2 "2020-06-01T20:29:29Z")

</div>

Hi!  
Have you checked known solutions to` unknown type in kibana` like refreshing index pattern: [Unknown type in Discover even with Dynamic Mapping](https://discuss.elastic.co/t/unknown-type-in-discover-even-with-dynamic-mapping/229423)  
or checking conflicting field types?  
[Kibana Unknown Field Type](https://discuss.elastic.co/t/kibana-unknown-field-type/202851)

---

<div class="post-metadata">

### Author: ![sakthiskv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sakthiskv/32/70155_2.png) [@sakthiskv](https://discuss.elastic.co/u/sakthiskv)
#### Post date: [June 2, 2020, 8:40am UTC](https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198/3 "2020-06-02T08:40:59Z")

</div>

Thanks for quick reply,  
I checked all above u mentioned. there is no problem.  
My problem is not able to apply grok filter for that UNKNOWN type fields in logstash filter section.

---

<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 30, 2020, 8:41am UTC](https://discuss.elastic.co/t/not-able-to-give-unknown-field-name-in-grok-filter/235198/4 "2020-06-30T08:41:00Z")

</div>

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