# Filebeat add docker metada fail

**URL:** <https://discuss.elastic.co/t/filebeat-add-docker-metada-fail/241958>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 21, 2020, 2:37am UTC](https://discuss.elastic.co/t/filebeat-add-docker-metada-fail/241958 "2020-07-21T02:37:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tungpzostar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tungpzostar/32/72181_2.png) [@tungpzostar](https://discuss.elastic.co/u/tungpzostar)\
**Post date:** [July 21, 2020, 2:37am UTC](https://discuss.elastic.co/t/filebeat-add-docker-metada-fail/241958/1 "2020-07-21T02:37:23Z")

</div>

Hello everybody, I'm having this issue when try to get docker metada. This is myconfiguration:

```auto
filebeat.inputs:
- type: docker
  combine_partial: true
  containers:
    path: "/usr/share/dockerlogs/data"
    stream: "all"
    ids:
      - "*"
processors:
  # decode the log field (sub JSON document) if JSON encoded, then maps it's fields to elasticsearch fields
- decode_json_fields:
    fields: ["log", "message"]
    target: ""
    # overwrite existing target elasticsearch fields while decoding json fields    
    overwrite_keys: true
- add_docker_metadata:
    #host: "unix:///var/run/docker.sock"

output.console:
  pretty: true

```

and in container volume i do use /var/run/docker.sock:/var/run/docker.sock  
This config working in others server, but this server I deploy filebeat on it cannot get docker metadata. I also use user root and grant all privilege to docker.sock folder.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [July 21, 2020, 10:57am UTC](https://discuss.elastic.co/t/filebeat-add-docker-metada-fail/241958/2 "2020-07-21T10:57:49Z")

</div>

> [@tungpzostar](#):
>
> ` path: "/usr/share/dockerlogs/data"`

`dockerlogs`? I'm not very expert in how the `add_docker_metadata` works but this seems very specific to your setup. Are you sure you it isn't a simple path typo or anything similar?

---

<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:** [August 18, 2020, 12:57pm UTC](https://discuss.elastic.co/t/filebeat-add-docker-metada-fail/241958/3 "2020-08-18T12:57:51Z")

</div>

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