# Logstash split log base on space and =

**URL:** <https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526>\
**Category:** Logstash\
**Created:** [December 4, 2023, 8:01am UTC](https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526 "2023-12-04T08:01:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [December 4, 2023, 8:01am UTC](https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526/1 "2023-12-04T08:01:39Z")

</div>

I want to separate below log in Logstash, I know that we can do it by grok filter, but is there any way to do it without grok?  
Log:

```auto
date=2023-12-04 time=11:26:01 my_id=5646875 dir="D" type=ML severety=info mtype="my log" u_type="a/b" http_url="google.com" h_agent="my_site/205578 (465687/3564564)" msg="Hello World!" my_location="none"

```

Requested Output in elasticsearch:

```auto
date:2023-12-04
time:11:26:01
my_id:5646875
dir:"D"
type:ML
severety:info
mtype:"my log"
u_type:"a/b"
http_url:"google.com"
h_agent:"my_site/205578 (465687/3564564)"
msg:"Hello World!"
my_location:"none"

```

Thanks

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [December 4, 2023, 8:39am UTC](https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526/2 "2023-12-04T08:39:25Z")

</div>

```auto
 filter {
  kv { 
      source => "message"
      value_split => "="
      field_split => " "
   }
}

```

---

<div class="post-metadata">

**Author:** ![sahere37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sahere37](https://discuss.elastic.co/u/sahere37)\
**Post date:** [December 19, 2023, 11:51am UTC](https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526/3 "2023-12-19T11:51:39Z")

</div>

Thanks. it works

---

<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 16, 2024, 11:52am UTC](https://discuss.elastic.co/t/logstash-split-log-base-on-space-and/348526/4 "2024-01-16T11:52:10Z")

</div>

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