# Kv values include spaces

**URL:** <https://discuss.elastic.co/t/kv-values-include-spaces/162568>\
**Category:** Logstash\
**Created:** [January 1, 2019, 1:10pm UTC](https://discuss.elastic.co/t/kv-values-include-spaces/162568 "2019-01-01T13:10:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsheridan](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@nsheridan](https://discuss.elastic.co/u/nsheridan)\
**Post date:** [January 1, 2019, 1:10pm UTC](https://discuss.elastic.co/t/kv-values-include-spaces/162568/1 "2019-01-01T13:10:18Z")

</div>

if I have this log message:

key1=foo  
key2=bar  
key3=foo bar

How can I use kv filters to represent the above as:

```
  "key1" => "foo",
  "key2" => "bar",
  "key3" => "foo bar"

```

As if I change the space delimeter it seems to get confused, quite rightly too, as the kv's are split between spaces

I am only concerned with values having arbitrary spaces and not keys. Help!

☹

---

<div class="post-metadata">

**Author:** ![nsheridan](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@nsheridan](https://discuss.elastic.co/u/nsheridan)\
**Post date:** [January 2, 2019, 6:15am UTC](https://discuss.elastic.co/t/kv-values-include-spaces/162568/2 "2019-01-02T06:15:18Z")

</div>

I should add to this for context the original syslog message comes in like this:

```
key1=foo key2=bar key3=foo bar

```

Therefore the values are not delimited by inverted commas, and there mey be a key4 after which may remove the use of greedydata

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:** [January 30, 2019, 6:15am UTC](https://discuss.elastic.co/t/kv-values-include-spaces/162568/3 "2019-01-30T06:15:18Z")

</div>

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