# Winlogbeats remove @metadata, agent and ecs fields

**URL:** <https://discuss.elastic.co/t/winlogbeats-remove-metadata-agent-and-ecs-fields/269764>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [April 10, 2021, 7:07am UTC](https://discuss.elastic.co/t/winlogbeats-remove-metadata-agent-and-ecs-fields/269764 "2021-04-10T07:07:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![witkacy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/witkacy/32/86869_2.png) [@witkacy](https://discuss.elastic.co/u/witkacy)\
**Post date:** [April 10, 2021, 7:07am UTC](https://discuss.elastic.co/t/winlogbeats-remove-metadata-agent-and-ecs-fields/269764/1 "2021-04-10T07:07:09Z")

</div>

Hello,

Is it possible to not include in exported log fields:

@metadata, agent and ecs?

I added processor

```auto
- drop_fields:
            fields: ["host", "log", "event", "agent", "ecs", "winlog", "@metadata"]

```

and most of fields were removed but not agent, ecs and @metadata

---

<div class="post-metadata">

**Author:** ![kavierkoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kavierkoo/32/86555_2.png) [@kavierkoo](https://discuss.elastic.co/u/kavierkoo)\
**Post date:** [April 11, 2021, 1:35pm UTC](https://discuss.elastic.co/t/winlogbeats-remove-metadata-agent-and-ecs-fields/269764/2 "2021-04-11T13:35:40Z")

</div>

Hi Witkacy,

There's a similar post on stackoverflow for Filebeat regarding @metadata,  
Perhaps you could take a look at the solution there to see if it helps with your situation.

> You need to remove the additional `add_host_metadata` and `add_cloud_metadata` metadata you're adding explicitly and remove the remainder of the fields with the [drop\_field processor](https://www.elastic.co/guide/en/beats/filebeat/master/drop-fields.html):

> <https://stackoverflow.com/questions/65027656/how-to-remove-filebeat-metadata>

Hope this helps you!

---

<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:** [May 9, 2021, 3:35pm UTC](https://discuss.elastic.co/t/winlogbeats-remove-metadata-agent-and-ecs-fields/269764/3 "2021-05-09T15:35:41Z")

</div>

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