# How filebeat chooses module paths based on OS when running inside docker

**URL:** <https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921>\
**Category:** Beats\
**Created:** [March 24, 2020, 9:59pm UTC](https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921 "2020-03-24T21:59:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![micas](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@micas](https://discuss.elastic.co/u/micas)\
**Post date:** [March 24, 2020, 9:59pm UTC](https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921/1 "2020-03-24T21:59:28Z")

</div>

I have filebeat running on a docker container, on the documentation it says that when activating a module, if i leave the paths as default it will choose the path based on the OS.

Obviously i want to capture the log files of the HOST.

How is filebeat made aware of the HOST OS in order to make that decision ? or will it just assume the paths of the container OS?

---

<div class="post-metadata">

**Author:** ![MarianaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marianad/32/42687_2.png) [@MarianaD](https://discuss.elastic.co/u/MarianaD)\
**Post date:** [March 25, 2020, 9:27am UTC](https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921/2 "2020-03-25T09:27:27Z")

</div>

hi @micas,

> How is filebeat made aware of the HOST OS in order to make that decision ? or will it just assume the paths of the container OS?

The filebeat input (`log` in this case) will detect which operating system is running on and depending on the modules/filesets enabled different default paths are configured in the `manifest.yml` file. For example `system` module, `syslog` fileset here are the default paths [https://github.com/elastic/beats/blob/master/filebeat/module/system/syslog/manifest.yml](https://github.com/elastic/beats/blob/master/filebeat/module/system/syslog/manifest.yml).

---

<div class="post-metadata">

**Author:** ![micas](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@micas](https://discuss.elastic.co/u/micas)\
**Post date:** [March 25, 2020, 12:46pm UTC](https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921/3 "2020-03-25T12:46:02Z")

</div>

Just to make it clear, so if i have it running on a HOST system running Darwin and use a docker container running debian with filebeat inside it, it will default to the paths of debian and not be able to identify that is running on a darwin host.

Any setting i can use to bypass this behaviour? Like being able to globally tell filebeat and others that they should use darwin paths by default with a certain prefix say "/hostfs/..." ?

---

<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:** [April 22, 2020, 2:46pm UTC](https://discuss.elastic.co/t/how-filebeat-chooses-module-paths-based-on-os-when-running-inside-docker/224921/4 "2020-04-22T14:46:06Z")

</div>

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