# Set up logging settings for filebeat as environment variables

**URL:** <https://discuss.elastic.co/t/set-up-logging-settings-for-filebeat-as-environment-variables/277648>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [July 2, 2021, 12:55pm UTC](https://discuss.elastic.co/t/set-up-logging-settings-for-filebeat-as-environment-variables/277648 "2021-07-02T12:55:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinci](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vinci](https://discuss.elastic.co/u/vinci)\
**Post date:** [July 2, 2021, 12:55pm UTC](https://discuss.elastic.co/t/set-up-logging-settings-for-filebeat-as-environment-variables/277648/1 "2021-07-02T12:55:52Z")

</div>

I've been searching for documentation regarding passing environmental variables to filebeat in order to set up logging, but I wasn't able to find out.  
Can anyone help me in this respect?

I've only been able to find this link, which configures the variables inside the yml:

> **[Configure logging | Filebeat Reference \[7.13\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html)**

I'm guessing this isn't the only way to do it, right?

Thanks!

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [July 5, 2021, 9:30am UTC](https://discuss.elastic.co/t/set-up-logging-settings-for-filebeat-as-environment-variables/277648/2 "2021-07-05T09:30:00Z")

</div>

This is the recommended way. You can also use command line options, but I'm not quite sure if there is any interface for environment variables.

---

<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:** [August 2, 2021, 11:30am UTC](https://discuss.elastic.co/t/set-up-logging-settings-for-filebeat-as-environment-variables/277648/3 "2021-08-02T11:30:42Z")

</div>

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