# Override module configuration on start

**URL:** <https://discuss.elastic.co/t/override-module-configuration-on-start/88279>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 5, 2017, 2:03pm UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279 "2017-06-05T14:03:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremmm](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jeremmm](https://discuss.elastic.co/u/jeremmm)\
**Post date:** [June 5, 2017, 2:03pm UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279/1 "2017-06-05T14:03:13Z")

</div>

Hello,

I would like to know if it was possible to override the configuration of a module with the option -E.  
I tried several syntax but no effect.

Thanks

---

<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:** [June 6, 2017, 9:51am UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279/2 "2017-06-06T09:51:41Z")

</div>

yes, you can overwrite any configuration setting with `-E`, but you need to know the complete settings name and/or use json like syntax for more complex 'objects'. What is it exactly you want to solve/overwrite?

---

<div class="post-metadata">

**Author:** ![jeremmm](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jeremmm](https://discuss.elastic.co/u/jeremmm)\
**Post date:** [June 6, 2017, 10:42am UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279/3 "2017-06-06T10:42:50Z")

</div>

Yes, i already use **-E** for another setting. I want override **hosts** parameter for kubelet module (6.0.0 alpha1).

---

<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:** [June 7, 2017, 10:00am UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279/4 "2017-06-07T10:00:03Z")

</div>

Can you share your metricbeat module configurations?

In metricbeat you configure the modules as array. This must reflect in the full path given by `-E`. For example `-E metricbeat.modules.0.hosts="host1,host2"`.

Alternatively the config file format [supports referencing](https://www.elastic.co/guide/en/beats/libbeat/current/config-gile-format-refs.html) other setting via `${<name>}` syntax. One can use this to do this:

```auto
metricbeat.modules:
- type: ...
  hosts: ${myhosts}

```

Now you can run metricbeat by either setting myhosts as environment variable or overwrite it in the configs via `-E`:

1. `myhosts="host1,host2" metricbeat ...`
2. `metricbeat -E myhosts="host1,host2" ...`

---

<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:** [July 5, 2017, 10:00am UTC](https://discuss.elastic.co/t/override-module-configuration-on-start/88279/5 "2017-07-05T10:00:34Z")

</div>

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