# Drop fields from Apache2 module

**URL:** <https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 4, 2018, 2:30pm UTC](https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382 "2018-12-04T14:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikael\_VERO](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mikael\_VERO](https://discuss.elastic.co/u/Mikael_VERO)\
**Post date:** [December 4, 2018, 2:30pm UTC](https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382/1 "2018-12-04T14:30:38Z")

</div>

Hi,

I have an issue I am strugling with since some times and I can't find anything on this forum.  
I hope you'll be able to help me since i'm desperate.

I am trying to drop some fields from the apache2 module of filebeat.  
See below an example of my module config (/etc/filebeat/modules.d/apache2.yml):

```auto
    - module: apache2
      access:
        enabled: true
        var.paths: ["/var/log/api_front-access.log"]
        processors:
            - drop_fields:
                fields: ["access.user_agent.device"]
      error:
        enabled: false
        var.paths: ["/var/log/api_front-error.log"]

```

Thank you!! 🙂

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [December 5, 2018, 2:05pm UTC](https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382/2 "2018-12-05T14:05:59Z")

</div>

Modules do not parse content in beats, but in Ingest Node. The file defining the ingest node pipeline can be found in the filebeats module directory [apache2/access/ingest/default.json](https://github.com/elastic/beats/blob/master/filebeat/module/apache2/access/ingest/default.json).

One can modify the pipeline definition. But so to not loose changes to the module when updating filebeat, better copy the apache2 module definition as is into `myapache2` and modify the ingest node definition to remove the `access.user_agent.device` field.

One can configure the path of module definitions in filebeat. Alternatively to cloning the module, copy the definitions, change the path to your copy, adapt the `apache2` module. Afterwards remove the old apache2 access ingest pipeline so to force a reinstall of the pipeline.

---

<div class="post-metadata">

**Author:** ![Mikael\_VERO](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mikael\_VERO](https://discuss.elastic.co/u/Mikael_VERO)\
**Post date:** [December 5, 2018, 2:40pm UTC](https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382/3 "2018-12-05T14:40:53Z")

</div>

Hi,

Thank you for your response.

Ok I will try this solution.  
I thought that this was possible because I did the same thing in metricbeat system module and it worked perfectly.

---

<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 2, 2019, 2:40pm UTC](https://discuss.elastic.co/t/drop-fields-from-apache2-module/159382/4 "2019-01-02T14:40:55Z")

</div>

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