# How to fetch specific data from message text and add it in new field

**URL:** <https://discuss.elastic.co/t/how-to-fetch-specific-data-from-message-text-and-add-it-in-new-field/163704>\
**Category:** Elasticsearch\
**Created:** [January 10, 2019, 10:27am UTC](https://discuss.elastic.co/t/how-to-fetch-specific-data-from-message-text-and-add-it-in-new-field/163704 "2019-01-10T10:27:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ani](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@Ani](https://discuss.elastic.co/u/Ani)\
**Post date:** [January 10, 2019, 10:27am UTC](https://discuss.elastic.co/t/how-to-fetch-specific-data-from-message-text-and-add-it-in-new-field/163704/1 "2019-01-10T10:27:26Z")

</div>

We are using this below grok pattern :

grok {  
match =\> {  
message =\> "^%{TIMESTAMP\_ISO8601:timestamp\_match}\s\*%{WORD:system}\s\*%{LOGLEVEL:loglevel}\s\*%{SYSLOGHOST:session\_id}\s\*%{SYSLOGHOST:req\_id}\s\*%{WORD:user}\s\*%{WORD:channel}\s\*-\s\*%{USERNAME:rqrs}\s\*%{GREEDYDATA:message\_text}\s\*"

```
    } 

```

Log: 2019-01-10T12:50:00,362 system INFO 187b2850-14bd-11e9-be75-0a0484180000 187b2648-14bd-11e9-be75-0a0484180000 System system - REQUEST {method=GET, path=/LCLG/lclg/pending-activation-status, headers={SOAPAction="", requestId=187b2648-14bd-11e9-be75-0a0484180000, Connection=Keep-Alive, Host=_._._.153:30_\*\*, sessionId=187b2850-14bd-11e9-be75-0a0484180000, userName=Syst

We need to fetch path (path=/LCLG/lclg/pending-activation-status) from messege\_text field (messege\_text field created in Grok Pateern) and add it in a new field "path" .

---

<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:** [February 7, 2019, 10:32am UTC](https://discuss.elastic.co/t/how-to-fetch-specific-data-from-message-text-and-add-it-in-new-field/163704/2 "2019-02-07T10:32:24Z")

</div>

Closed on February 7, 2019, 10:32am UTC

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