# Drop agent / ecs fields from filebeat (previous solves here only partially work)

**URL:** <https://discuss.elastic.co/t/drop-agent-ecs-fields-from-filebeat-previous-solves-here-only-partially-work/304508>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 11, 2022, 9:44pm UTC](https://discuss.elastic.co/t/drop-agent-ecs-fields-from-filebeat-previous-solves-here-only-partially-work/304508 "2022-05-11T21:44:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk-user-99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elk-user-99/32/105460_2.png) [@elk-user-99](https://discuss.elastic.co/u/elk-user-99)\
**Post date:** [May 11, 2022, 9:44pm UTC](https://discuss.elastic.co/t/drop-agent-ecs-fields-from-filebeat-previous-solves-here-only-partially-work/304508/1 "2022-05-11T21:44:37Z")

</div>

Hey all,

I'm attempting to use filebeat to send documents into ES, however even though I've got a processor set up to drop fields, some are still stubbornly getting sent.

in my filebeat.yml file:

```auto
- drop_fields:
          fields: ["message", "decoded", "agent.ephmeral_id", "agent.hostname", "agent.id", "agent.name", "agent.name", "agent.type", "agent.version", "ecs.version", "host.name", "input.type", "log.file.path"]

```

I know that drop\_fields is working because it's dropping some of those fields, but the agent.\*, ecs.version, and host.name persist.

I double checked and all of the "add\_\*\_metadata" processors are commented out later on in the file. Is there some newer trick required to remove those fields now? I'm running a 7.x version of filebeat at the moment.

---

<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:** [June 8, 2022, 11:45pm UTC](https://discuss.elastic.co/t/drop-agent-ecs-fields-from-filebeat-previous-solves-here-only-partially-work/304508/2 "2022-06-08T23:45:34Z")

</div>

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