# KV filter problem with value\_split

**URL:** https://discuss.elastic.co/t/kv-filter-problem-with-value-split/133436
**Category:** Logstash
**Created:** [May 28, 2018, 2:16am UTC](https://discuss.elastic.co/t/kv-filter-problem-with-value-split/133436 "2018-05-28T02:16:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DanV](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@DanV](https://discuss.elastic.co/u/DanV)
#### Post date: [May 28, 2018, 2:16am UTC](https://discuss.elastic.co/t/kv-filter-problem-with-value-split/133436/1 "2018-05-28T02:16:26Z")

</div>

Hello,

i'm using the kv filter to parse a log, especially field named User that has a string value of:

```
                User Name: Daniel Venzi

```

the kv filter is in the format:

```
             kv {
                         source => "User"
                         value_split => ":"
                  }

```

as a result i create a key named "Name" with an associated value of "Daniel". But that's not what i need. I want to use the kv filter in way that everything before the value\_split is a key and the string after the value\_split is the key associated value. Something like:

```
            "User Name" => "Daniel Venzi"

```

is there a way to do this?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 28, 2018, 2:02pm UTC](https://discuss.elastic.co/t/kv-filter-problem-with-value-split/133436/2 "2018-05-28T14:02:11Z")

</div>

You need to set field split to something other than the default, which is space. If, for example, you set field\_split =\> "/" you would get what you want.

---

<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 25, 2018, 2:11pm UTC](https://discuss.elastic.co/t/kv-filter-problem-with-value-split/133436/3 "2018-06-25T14:11:43Z")

</div>

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