# Get logs from docker containers in filebeat

**URL:** https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180
**Category:** Beats
**Created:** [November 2, 2018, 2:11pm UTC](https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180 "2018-11-02T14:11:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bertolis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bertolis/32/35522_2.png) [@bertolis](https://discuss.elastic.co/u/bertolis)
#### Post date: [November 2, 2018, 2:11pm UTC](https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180/1 "2018-11-02T14:11:33Z")

</div>

Hi, lets say i have an elastic stack running in docker. In another pc i have an Alfresco running in docker as well. In the same pc i also have filebeat that is running in docker too. The Alfresco image has tomcat and postgresql logs. How am i gonna get these logs and visualize them in kibana. I am only able to get and visualize logs from none dockerized services like an Apache server in my system's /var/log/\*.log. I run filebeat via docker-compose.  
Thanks.

---

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [November 2, 2018, 2:33pm UTC](https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180/2 "2018-11-02T14:33:34Z")

</div>

You could look at the deployment files provided for Kubernetes deployment and see if you could adapt from there? - certainly in a K8s environment I've got Filebeat running in one container harvesting both platform logs and logs from other containers.

---

<div class="post-metadata">

### Author: ![bertolis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bertolis/32/35522_2.png) [@bertolis](https://discuss.elastic.co/u/bertolis)
#### Post date: [November 8, 2018, 11:37am UTC](https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180/3 "2018-11-08T11:37:03Z")

</div>

Ok i found a way.

1. I can configure "Docker input " and "Filebeat autodiscover" inside filebeat.yml
2. I can use "volumes" to get log files locally and then set the corresponding path to each module inside filebeat.yml.  
Thanks for the help.

---

<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: [December 6, 2018, 1:37pm UTC](https://discuss.elastic.co/t/get-logs-from-docker-containers-in-filebeat/155180/4 "2018-12-06T13:37:04Z")

</div>

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