# How to search concatenated string in the message

**URL:** <https://discuss.elastic.co/t/how-to-search-concatenated-string-in-the-message/144280>\
**Category:** Logstash\
**Created:** [August 14, 2018, 6:13am UTC](https://discuss.elastic.co/t/how-to-search-concatenated-string-in-the-message/144280 "2018-08-14T06:13:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satya](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Satya](https://discuss.elastic.co/u/Satya)\
**Post date:** [August 14, 2018, 6:13am UTC](https://discuss.elastic.co/t/how-to-search-concatenated-string-in-the-message/144280/1 "2018-08-14T06:13:19Z")

</div>

HI,  
In my logstash layer I am receiving the cf loggregator message in json format.  
Example:  
{ "name" : "abc", "address" : "bangalore}

If I want to search in my logstash grok filter, if "name":"abc" is present in the message then do some specific action.  
Can you please tell how can we achieve this?

Here I want to check complete concatenated string: "name":"abc"

THanks in advance.

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [August 14, 2018, 11:13am UTC](https://discuss.elastic.co/t/how-to-search-concatenated-string-in-the-message/144280/2 "2018-08-14T11:13:03Z")

</div>

Hi Satya,

You could use a regex conditional.

[https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#conditionals](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#conditionals)

---

<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:** [September 11, 2018, 11:13am UTC](https://discuss.elastic.co/t/how-to-search-concatenated-string-in-the-message/144280/3 "2018-09-11T11:13:14Z")

</div>

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