# Help to create new field from message

**URL:** <https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626>\
**Category:** Logstash\
**Created:** [March 2, 2022, 1:58pm UTC](https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626 "2022-03-02T13:58:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Panplumousse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/panplumousse/32/102201_2.png) [@Panplumousse](https://discuss.elastic.co/u/Panplumousse)\
**Post date:** [March 2, 2022, 1:58pm UTC](https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626/1 "2022-03-02T13:58:16Z")

</div>

Hello every body,

I m looking for a way (maybe with grok, probably with grok 😃 ), to create new field by extracting some specifique pattern but with keeping the field message without modification after operation

Example:  
2022-03-02 13:16:49.199 DEBUG --- [ool-2-thread-34] c.i.c.b.u.s.CommonSlackService : SR-MODIFY-DISK:jjcb SRID:631221 ServiceTask\_1gqecng:e25 [SLACK] Sending message: FATAL Error! Processing of SR-MODIFY-DISK for businessKey SRID:631221 For more details, follow this lin

Need to create new field SRID with value 631221

thx a lot for help

---

<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:** [March 2, 2022, 6:25pm UTC](https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626/2 "2022-03-02T18:25:40Z")

</div>

Try

```
grok { match => { "message" => "SRID:%{NUMBER:SRID}" } }
```

---

<div class="post-metadata">

**Author:** ![Panplumousse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/panplumousse/32/102201_2.png) [@Panplumousse](https://discuss.elastic.co/u/Panplumousse)\
**Post date:** [March 3, 2022, 12:36pm UTC](https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626/3 "2022-03-03T12:36:46Z")

</div>

> [@Badger](#):
>
> `SRID:%{NUMBER:SRID}`

Thx you 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:** [March 31, 2022, 12:36pm UTC](https://discuss.elastic.co/t/help-to-create-new-field-from-message/298626/4 "2022-03-31T12:36:56Z")

</div>

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