# Combining 2 fields in logstash

**URL:** <https://discuss.elastic.co/t/combining-2-fields-in-logstash/179066>\
**Category:** Logstash\
**Created:** [April 30, 2019, 10:40am UTC](https://discuss.elastic.co/t/combining-2-fields-in-logstash/179066 "2019-04-30T10:40:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![satyajeet\_dutt](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@satyajeet\_dutt](https://discuss.elastic.co/u/satyajeet_dutt)\
**Post date:** [April 30, 2019, 10:40am UTC](https://discuss.elastic.co/t/combining-2-fields-in-logstash/179066/1 "2019-04-30T10:40:34Z")

</div>

I have been trying to combine 2 fields in logstash.  
My first clickstream log contains {x=y, software=DEMO, language=EN} as a parameter.  
My second log contains clickstream log {a=b, projectId=DEMO, language=EN} as a parameter.

I want to make a single field called software\_used that contains value of software and projectId.  
Someone plz help me with this.

---

<div class="post-metadata">

**Author:** ![logger](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@logger](https://discuss.elastic.co/u/logger)\
**Post date:** [May 24, 2019, 3:18pm UTC](https://discuss.elastic.co/t/combining-2-fields-in-logstash/179066/2 "2019-05-24T15:18:54Z")

</div>

Hi,

you can grok it to get rid of the curly brackets and then use the kv filter:  
[https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html)

after this you can use the mutate filter to combine these as you want.  
[https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html)

---

<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 21, 2019, 3:18pm UTC](https://discuss.elastic.co/t/combining-2-fields-in-logstash/179066/3 "2019-06-21T15:18:57Z")

</div>

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