# I have to concatenate below two fields

**URL:** <https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228>\
**Category:** Logstash\
**Created:** [April 17, 2019, 8:18am UTC](https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228 "2019-04-17T08:18:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantkhokhar](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@hemantkhokhar](https://discuss.elastic.co/u/hemantkhokhar)\
**Post date:** [April 17, 2019, 8:18am UTC](https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228/1 "2019-04-17T08:18:42Z")

</div>

%{URIPATH:url}%{DATA:[status]}  
I am using this but not success add\_field =\> ["%{DATA:actual-url}", "%{URIPATH:url} %{DATA:[status]}"]

---

<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:** [April 17, 2019, 1:19pm UTC](https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228/2 "2019-04-17T13:19:16Z")

</div>

If you have use a grok pattern to create two fields called url and status then you would combine them using

```
mutate { add_field => { "actual_url" => "%{url}%{status}" } }
```

---

<div class="post-metadata">

**Author:** ![hemantkhokhar](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@hemantkhokhar](https://discuss.elastic.co/u/hemantkhokhar)\
**Post date:** [April 19, 2019, 9:49am UTC](https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228/3 "2019-04-19T09:49:05Z")

</div>

Thanks @Badger now its working fine 🙂

---

<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:** [May 17, 2019, 9:49am UTC](https://discuss.elastic.co/t/i-have-to-concatenate-below-two-fields/177228/4 "2019-05-17T09:49:09Z")

</div>

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