# Find and replace string in message field

**URL:** <https://discuss.elastic.co/t/find-and-replace-string-in-message-field/253574>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 28, 2020, 2:13pm UTC](https://discuss.elastic.co/t/find-and-replace-string-in-message-field/253574 "2020-10-28T14:13:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randoran](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@randoran](https://discuss.elastic.co/u/randoran)\
**Post date:** [October 28, 2020, 2:13pm UTC](https://discuss.elastic.co/t/find-and-replace-string-in-message-field/253574/1 "2020-10-28T14:13:40Z")

</div>

Is there a way using filebeat to find and replace a string in the [message] field of a log entry before sending to Elasticsearch? (similar to mutate and gsub in logstash)

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [October 29, 2020, 11:33am UTC](https://discuss.elastic.co/t/find-and-replace-string-in-message-field/253574/2 "2020-10-29T11:33:04Z")

</div>

Hi!

Script processor might be the way to go here: [https://www.elastic.co/guide/en/beats/filebeat/master/processor-script.html](https://www.elastic.co/guide/en/beats/filebeat/master/processor-script.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:** [November 26, 2020, 1:33pm UTC](https://discuss.elastic.co/t/find-and-replace-string-in-message-field/253574/3 "2020-11-26T13:33:04Z")

</div>

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