# Drop metadata fields using drop\_fields processor in elastic agent config

**URL:** <https://discuss.elastic.co/t/drop-metadata-fields-using-drop-fields-processor-in-elastic-agent-config/290215>\
**Category:** Beats\
**Tags:** elastic-agent\
**Created:** [November 25, 2021, 8:04pm UTC](https://discuss.elastic.co/t/drop-metadata-fields-using-drop-fields-processor-in-elastic-agent-config/290215 "2021-11-25T20:04:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clewo](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@clewo](https://discuss.elastic.co/u/clewo)\
**Post date:** [November 25, 2021, 8:04pm UTC](https://discuss.elastic.co/t/drop-metadata-fields-using-drop-fields-processor-in-elastic-agent-config/290215/1 "2021-11-25T20:04:19Z")

</div>

Hi guys,

I've issues to drop some metadata fields in the elastic agent config using the drop\_fields processor.

I tried to configure the processor in the agent.yml inputs section:

```auto
inputs:
  - id: b21f2d23-1bf5-4e0b-852f-96eb58a774a1
    name: kubernetes-container-logs
    revision: 1
    type: logfile
    use_output: default
    meta:
      package:
        name: kubernetes
        version: 1.1.0
    data_stream:
      namespace: test
    streams:
      - id: logfile-kubernetes.container_logs-b21f2d23-1bf5-4e0b-852f-96eb58a774a1
        data_stream:
          dataset: kubernetes.container_logs
          type: logs
        paths:
          - '/var/log/containers/*${kubernetes.container.id}.log'
        symlinks: true
        processors:
          - drop_fields:
                fields: ["host.name"]

```

Unfortunately I'm still seeing the field in Elasticsearch.

Can you give me a hint, what's wrong?

---

<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:** [December 23, 2021, 10:04pm UTC](https://discuss.elastic.co/t/drop-metadata-fields-using-drop-fields-processor-in-elastic-agent-config/290215/2 "2021-12-23T22:04:51Z")

</div>

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