# Problem getting autodiscover docker to work with filebeat

**URL:** <https://discuss.elastic.co/t/problem-getting-autodiscover-docker-to-work-with-filebeat/144349>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 14, 2018, 12:40pm UTC](https://discuss.elastic.co/t/problem-getting-autodiscover-docker-to-work-with-filebeat/144349 "2018-08-14T12:40:33Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![sgreszcz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sgreszcz/32/46322_2.png) [@sgreszcz](https://discuss.elastic.co/u/sgreszcz)\
**Post date:** [August 15, 2018, 12:31pm UTC](https://discuss.elastic.co/t/problem-getting-autodiscover-docker-to-work-with-filebeat/144349/11 "2018-08-15T12:31:16Z")

</div>

OK, in the end I have it working correctly using both filebeat.autodiscover and filebeat.inputs and I think that both are needed to get the docker container logs processed properly. I wish this was documented better, but hopefully someone can find this and it helps them out. I still don't know if this is 100% correct, but I'm getting all the docker container logs now with metadata.

Thanks @kvch for your help and responses!

```
filebeat.autodiscover:
# Autodiscover docker containers and parse logs
  providers:
    - type: docker
      templates:
          config:
            - type: docker
              containers.ids:
                - "${data.docker.container.id}"
              exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines
              
filebeat.inputs:
  - type: docker
    containers.ids:
      - "*"
    processors:
      - add_docker_metadata:
```

---

_[View the full topic](https://discuss.elastic.co/t/problem-getting-autodiscover-docker-to-work-with-filebeat/144349)._
