# How to set Kv filter plugin to keep spaces in value

**URL:** https://discuss.elastic.co/t/how-to-set-kv-filter-plugin-to-keep-spaces-in-value/73032
**Category:** Logstash
**Created:** [January 27, 2017, 3:53pm UTC](https://discuss.elastic.co/t/how-to-set-kv-filter-plugin-to-keep-spaces-in-value/73032 "2017-01-27T15:53:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Darrenliu](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@Darrenliu](https://discuss.elastic.co/u/Darrenliu)
#### Post date: [January 27, 2017, 3:53pm UTC](https://discuss.elastic.co/t/how-to-set-kv-filter-plugin-to-keep-spaces-in-value/73032/1 "2017-01-27T15:53:54Z")

</div>

Hi everyone :  
I am new to learn ELK, then I'm challenges in using kv filter now.  
Let me make it brief, the following is one part of my dataset:

`s1Label=Rule cs2Label=URL Category cs3Label=Virtual System`

then my configure is

```
filter {
kv{ 
       field_split=>" "
       value_split=>"=" }

```

the result I got was

```
"s1Label":"Rule" 
"cs2Label":"URL" 
"cs3Label":"Virtual" 

```

How can I get the values including space and set field\_split=\>" " at same time ?  
Or is there any other filter to do that except grok , because all data is not arranged in order.  
Anyway, I want data to separarate key, value as mentioned below by kv filter

```
"s1Label":"Rule" 
"cs2Label":"URL Category" 
"cs3Label":"Virtual System"

```

Please help me or give me some ideas for it, I'll appreciate. Thank a lot !

---

<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: [February 24, 2017, 3:54pm UTC](https://discuss.elastic.co/t/how-to-set-kv-filter-plugin-to-keep-spaces-in-value/73032/2 "2017-02-24T15:54:09Z")

</div>

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