# How to use Metricbeat Docker module in Docker Swarm

**URL:** <https://discuss.elastic.co/t/how-to-use-metricbeat-docker-module-in-docker-swarm/103019>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [October 6, 2017, 1:37pm UTC](https://discuss.elastic.co/t/how-to-use-metricbeat-docker-module-in-docker-swarm/103019 "2017-10-06T13:37:06Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [October 9, 2017, 5:39pm UTC](https://discuss.elastic.co/t/how-to-use-metricbeat-docker-module-in-docker-swarm/103019/6 "2017-10-09T17:39:34Z")

</div>

In a nutshell: Metricbeat needs access to the Docker socket to retrieve stats from it, but the docker image we ship runs as a user by default (to make it more secure). There are several ways to allow Metricbeat accessing the docker socket:

- Running as root user inside the container
- Using file system ACLs
- Adding metricbeat user to docker group, check [Trouble running metricbeat:5.3.0 with docker module](https://discuss.elastic.co/t/trouble-running-metricbeat-5-3-0-with-docker-module/82204/7)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-use-metricbeat-docker-module-in-docker-swarm/103019)._
