# Filebeat autodiscover for docker does not work on /var/lib/docker/containers

**URL:** <https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-does-not-work-on-var-lib-docker-containers/159766>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 6, 2018, 4:41pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-does-not-work-on-var-lib-docker-containers/159766 "2018-12-06T16:41:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [December 14, 2018, 11:38pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-does-not-work-on-var-lib-docker-containers/159766/2 "2018-12-14T23:38:23Z")

</div>

I have a similar issue, but I am new to setting this all up. Here's my filebeats.yml which I bake into the image

```
filebeat.config:
  modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true

processors:
  - drop_fields:
      fields:
        - "docker.containers.labels"
  - add_host_metadata: ~
  - add_cloud_metadata: ~

output.logstash:
  hosts: "${BEATS_HOST_PORT:log:5044}"
logging.level: warning

```

The `drop fields` was from [Using AutoDiscover feature for Docker does not work when running in Swarm mode](https://discuss.elastic.co/t/using-autodiscover-feature-for-docker-does-not-work-when-running-in-swarm-mode/120342/3) but that didn't work for me either.

My docker-compose file has the following service

```
  docker-beats:
    image: trajano.net/docker-beats
    volumes:
      - /var/lib/docker/containers:/var/lib/docker/containers:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    deploy:
      mode: global

```

Unfortunately I just get all the logs with no real attribution except for the file beats server

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a05fddec5a3243a5c8042cab16f68ce48cd593f9.png)

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-autodiscover-for-docker-does-not-work-on-var-lib-docker-containers/159766)._
