# How do you enable modules via the command line

**URL:** <https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [October 9, 2019, 9:40pm UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915 "2019-10-09T21:40:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trajano/32/38853_2.png) [@trajano](https://discuss.elastic.co/u/trajano)\
**Post date:** [October 9, 2019, 9:40pm UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915/1 "2019-10-09T21:40:36Z")

</div>

I'm trying to run metric beats without having a configuration file. I was wondering how do you enable modules?

I tried

-E modules.docker.enable=true  
-E module.docker.enable=true  
-E metricbeat.modules=[module.docker.enable=true]

But does not appear to work.

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [October 11, 2019, 1:54am UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915/2 "2019-10-11T01:54:28Z")

</div>

Hello,

Here is an example of enabling the apache & mysql modules:

> metricbeat modules enable apache mysql

More documentation and examples can be found here:

> **[Configure modules | Metricbeat Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-metricbeat.html)**

---

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trajano/32/38853_2.png) [@trajano](https://discuss.elastic.co/u/trajano)\
**Post date:** [October 11, 2019, 4:39pm UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915/3 "2019-10-11T16:39:03Z")

</div>

except in your example it does not enable it via the command line runner. So it won't work in Docker unless we create a custom image.

---

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trajano/32/38853_2.png) [@trajano](https://discuss.elastic.co/u/trajano)\
**Post date:** [October 13, 2019, 4:54am UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915/4 "2019-10-13T04:54:14Z")

</div>

Here is the solution I have used in my project that sets up an ELK stack with zero custom images or external configuration files.

> <https://github.com/trajano/elk-swarm/blob/master/elk.yml#L50-L60>

The whole project is in [https://github.com/trajano/elk-swarm/](https://github.com/trajano/elk-swarm/)

---

<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:** [November 10, 2019, 4:54am UTC](https://discuss.elastic.co/t/how-do-you-enable-modules-via-the-command-line/202915/5 "2019-11-10T04:54:22Z")

</div>

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