# Logstash Parsing - kv filter

**URL:** <https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714>\
**Category:** Logstash\
**Created:** [November 15, 2017, 10:07am UTC](https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714 "2017-11-15T10:07:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)\
**Post date:** [November 15, 2017, 10:07am UTC](https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714/1 "2017-11-15T10:07:06Z")

</div>

Hi All,

Iam trying to parse the events using kv filter ,

my kibana looks likes this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/0/6087b00919397e9136020f3015c9a894ff89b855.png)

How to make just

**from : [ebay@ebay.com](mailto:ebay@ebay.com)**

but iam getting like **78AE89C45C: from : [ebay@ebay.com](mailto:ebay@ebay.com)**

moreover iam getting duplicate fields as well, how to remove it .

my logstash config looks like this

input {  
udp {  
port =\> 5540  
}  
}

filter{  
json{  
source =\> "message"  
}  
kv {  
source =\> "MESSAGE"  
remove\_field =\> ["MESSAGE"]  
value\_split =\> "="  
field\_split =\> ","  
trim\_value =\> "\<\>"  
}  
}

Please do help me in fixing this issue ,really need it .  
Thanks,  
Raj

---

<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:** [November 15, 2017, 1:11pm UTC](https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714/2 "2017-11-15T13:11:56Z")

</div>

Use a grok or dissect filter to extract the key=value list into a field of its own so that what you're feeding to the kv filter is

```
from=<ebay@ebay.com> ...

```

and not

```
78AE89C45C: from=<ebay@ebay.com> ...
```

---

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)\
**Post date:** [November 20, 2017, 12:06pm UTC](https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714/3 "2017-11-20T12:06:50Z")

</div>

Thanks Magnus ,I will try this and check 🙂

---

<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:** [December 18, 2017, 12:07pm UTC](https://discuss.elastic.co/t/logstash-parsing-kv-filter/107714/4 "2017-12-18T12:07:00Z")

</div>

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