# Filebeat.autodiscover for docker container logs

**URL:** https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-container-logs/131459
**Category:** Beats
**Created:** [May 11, 2018, 10:51am UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-container-logs/131459 "2018-05-11T10:51:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Venkatesh\_Radhakrish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatesh_radhakrish/32/31105_2.png) [@Venkatesh\_Radhakrish](https://discuss.elastic.co/u/Venkatesh_Radhakrish)
#### Post date: [May 11, 2018, 10:51am UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-container-logs/131459/1 "2018-05-11T10:51:34Z")

</div>

Hi - How to configure file beat yml to read logs of all docker containers?

Below is the configuration i am using now (Working perfectly fine) which i feel is not clean way of coding.

filebeat.autodiscover:

# List of enabled autodiscover providers

providers:  
- type: docker  
templates:  
- condition.not:  
equals.docker.container.image: ABCD  
config:  
- type: log  
paths:  
- /var/lib/docker/containers/${data.docker.container.id}/\*.log

Regards  
Venkat

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [May 11, 2018, 11:00am UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-container-logs/131459/2 "2018-05-11T11:00:41Z")

</div>

To me it seems clean. It's simple and easy to understand.

You can use `docker` input for collecting logs of Docker. But it's an experimental feature: [https://www.elastic.co/guide/en/beats/filebeat/6.3/filebeat-input-docker.html](https://www.elastic.co/guide/en/beats/filebeat/6.3/filebeat-input-docker.html)  
It support docker specific use cases much better than log. For example on master `combine_partial` option is available which makes it possible to aggregate partial logs sent by Docker into one message.

---

<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: [June 8, 2018, 1:00pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-container-logs/131459/3 "2018-06-08T13:00:42Z")

</div>

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