# Filebeat default modules + custom log files

**URL:** <https://discuss.elastic.co/t/filebeat-default-modules-custom-log-files/159961>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 7, 2018, 3:56pm UTC](https://discuss.elastic.co/t/filebeat-default-modules-custom-log-files/159961 "2018-12-07T15:56:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coudenysj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coudenysj/32/23108_2.png) [@coudenysj](https://discuss.elastic.co/u/coudenysj)\
**Post date:** [December 7, 2018, 3:56pm UTC](https://discuss.elastic.co/t/filebeat-default-modules-custom-log-files/159961/1 "2018-12-07T15:56:20Z")

</div>

Hi,

I'm playing around with filebeat, and was wondering if what I'm trying to do is correct/the way to go.

I'm running filebeat with some modules enabled (apache2, mysql & system).

On the one hand, I want to extract some more fields from apache2 (vhost, response\_time, etc...), and on the other hand I want to include some custom application log file.

I know I can do the apache2 enrichment with a changed (or custom) ingest pipeline (see [https://github.com/elastic/beats/pull/5861/files#diff-ef7f2010bd20958842a648c883e85958](https://github.com/elastic/beats/pull/5861/files#diff-ef7f2010bd20958842a648c883e85958)), and I will probably need to to something similar for the custom application log files.

The question now is how I configure filebeat to accommodate this.

Do I add some conditional pipelines including the filename?

```
output.elasticsearch:
  hosts: ["http://localhost:9200"]
  pipelines:
    - pipeline: "application_log"
      when.contains:
        source: "/path/to/file"
    - pipeline: "enhanced_apache"
      when.contains:
        fileset.module: "apache2"

```

Is this the way to go?

---

<div class="post-metadata">

**Author:** ![coudenysj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coudenysj/32/23108_2.png) [@coudenysj](https://discuss.elastic.co/u/coudenysj)\
**Post date:** [December 10, 2018, 10:32am UTC](https://discuss.elastic.co/t/filebeat-default-modules-custom-log-files/159961/2 "2018-12-10T10:32:26Z")

</div>

I'm looking in the module directory for apache2 ([https://github.com/elastic/beats/tree/master/filebeat/module/apache2](https://github.com/elastic/beats/tree/master/filebeat/module/apache2)), and I can't find the pipeline config instruction.

Is the pipeline selection done via the pattern matching on the ingress node?

---

<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 7, 2019, 10:32am UTC](https://discuss.elastic.co/t/filebeat-default-modules-custom-log-files/159961/3 "2019-01-07T10:32:29Z")

</div>

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