# Setting type within logstash kv

**URL:** <https://discuss.elastic.co/t/setting-type-within-logstash-kv/90718>\
**Category:** Logstash\
**Created:** [June 24, 2017, 4:28pm UTC](https://discuss.elastic.co/t/setting-type-within-logstash-kv/90718 "2017-06-24T16:28:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dorian\_C](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@Dorian\_C](https://discuss.elastic.co/u/Dorian_C)\
**Post date:** [June 24, 2017, 4:28pm UTC](https://discuss.elastic.co/t/setting-type-within-logstash-kv/90718/1 "2017-06-24T16:28:48Z")

</div>

Hello,  
I'm having trouble to determine the type of dynamically created fields with kv filter.  
My config looks like this:

input {  
beats {  
port =\> 5044  
}  
}  
filter {  
grok {  
match =\> { "message" =\> "%{COMBINEDAPACHELOG}"}  
}  
kv {  
field\_split =\> "&?"  
type =\> "string"  
source =\> "request"  
}  
}  
output {  
elasticsearch {  
hosts =\> "localhost:9200"  
}  
}

But logstash is compaining:  
Cannot create pipeline {:reason=\>"The setting `type` in plugin `kv` is obsolete and is no longer available. You can achieve this same behavior with the new conditionals, like: `if [type] == "sometype" { kv { ... } }

How could I determine the type?  
Thanks

---

<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 22, 2017, 4:28pm UTC](https://discuss.elastic.co/t/setting-type-within-logstash-kv/90718/2 "2017-07-22T16:28:54Z")

</div>

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