# Drop field with dynamic name in filebeat

**URL:** <https://discuss.elastic.co/t/drop-field-with-dynamic-name-in-filebeat/259457>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 23, 2020, 8:15am UTC](https://discuss.elastic.co/t/drop-field-with-dynamic-name-in-filebeat/259457 "2020-12-23T08:15:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![malcolm666](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/malcolm666/32/69835_2.png) [@malcolm666](https://discuss.elastic.co/u/malcolm666)\
**Post date:** [December 23, 2020, 8:15am UTC](https://discuss.elastic.co/t/drop-field-with-dynamic-name-in-filebeat/259457/1 "2020-12-23T08:15:34Z")

</div>

Hi.  
I have filebeat (version 7.6.1) deployed in k8s and some application. This application generates a lot of json data that is parsed. I want to drop some json fields from the filebeat output. The problem is that the names of fields are dynamic but the beginning of field name always is "affected\_tmp\_". So I want to delete all fields using regex "affected\_tmp\*".  
How can I configure that in filebeat?  
I found the similar question but there was no answer ☹

> [@Drop multiple fields with regex on field names using filebeat](https://discuss.elastic.co/t/drop-multiple-fields-with-regex-on-field-names-using-filebeat/110496):
>
> Hello, I'm trying to send a big json file through filebeat to elasticsearch but I have too many fields so I want to drop a lot a them. I saw on the doc that I can do this using the filebeat processor and I did smthing like this : processors: drop\_fields: when: or: - regexp: thefield\_name\_randomstring: "test." - regexp: thefield\_name\_itsthebest: "test." fields: ["thefield\_name\_itsthebest", "thefield\_name\_randomstring"] It works fine but since I want to drop a lot of fields , I wanted…

---

<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:** [January 20, 2021, 10:15am UTC](https://discuss.elastic.co/t/drop-field-with-dynamic-name-in-filebeat/259457/2 "2021-01-20T10:15:44Z")

</div>

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