# Will configurations be reloaded when an environment variable changes?

**URL:** https://discuss.elastic.co/t/will-configurations-be-reloaded-when-an-environment-variable-changes/92689
**Category:** Beats
**Created:** [July 11, 2017, 3:53pm UTC](https://discuss.elastic.co/t/will-configurations-be-reloaded-when-an-environment-variable-changes/92689 "2017-07-11T15:53:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Bobby](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Bobby](https://discuss.elastic.co/u/Bobby)
#### Post date: [July 11, 2017, 3:53pm UTC](https://discuss.elastic.co/t/will-configurations-be-reloaded-when-an-environment-variable-changes/92689/1 "2017-07-11T15:53:07Z")

</div>

The current release (5.5) of Filebeat and Metricbeat contain a beta feature that has the beat reload its configuration file when it changes.

It's possible to have these yml files reference environment variables. Will the configuration reload be triggered when a referenced environment variable changes? Or is it only triggered when the timestamp of the yml file itself is updated on save?

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [July 11, 2017, 5:33pm UTC](https://discuss.elastic.co/t/will-configurations-be-reloaded-when-an-environment-variable-changes/92689/2 "2017-07-11T17:33:12Z")

</div>

> [@Bobby](#):
>
> Will the configuration reload be triggered when a referenced environment variable changes?

No. (And processes get a copy of the environment variables when they are started so they don't normally see changes to env vars outside of the process).

> [@Bobby](#):
>
> Or is it only triggered when the timestamp of the yml file itself is updated on save?

It scans the directory periodically and looks for added/removed/updated files. It detects updated files by changes in last modified time.

---

<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 1, 2017, 3:53pm UTC](https://discuss.elastic.co/t/will-configurations-be-reloaded-when-an-environment-variable-changes/92689/3 "2017-08-01T15:53:54Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
