# Where are Docker metadata?

**URL:** <https://discuss.elastic.co/t/where-are-docker-metadata/133561>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 28, 2018, 2:19pm UTC](https://discuss.elastic.co/t/where-are-docker-metadata/133561 "2018-05-28T14:19:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mimmus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mimmus/32/34273_2.png) [@mimmus](https://discuss.elastic.co/u/mimmus)\
**Post date:** [May 28, 2018, 2:19pm UTC](https://discuss.elastic.co/t/where-are-docker-metadata/133561/1 "2018-05-28T14:19:32Z")

</div>

I'm using Filebeat **in a Docker container** to forward logs of every container to a Kafka receiver:

```
filebeat.prospectors:
- type: log
  paths:
    - '/var/lib/docker/containers/*/*.log'
  json.message_key: log
  json.keys_under_root: true
  multiline.pattern: '^MSG|WNG|ERR'
  multiline.negate: true
  multiline.match: after
  tail_files: true
  processors:
  - add_docker_metadata: ~

output.kafka:
  hosts: ["plogelk01:9092", "plogelk02:9092", "plogelk03:9092"]
  codec.format:
    string: '%{[beat.hostname]} message=%{[log]}'
  topic: 'filebeat_SUBSTENV_logs'
  partition.round_robin:
    reachable_only: false
  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000
```

Any idea why I'm not able to see any docker.\* attribute looking at Kafka messages?  
Peraphs, am I skipping them by my custom codec?

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [May 28, 2018, 4:25pm UTC](https://discuss.elastic.co/t/where-are-docker-metadata/133561/2 "2018-05-28T16:25:57Z")

</div>

@mimmus I think you should see them, can you try using `output.file` instead of the `output.kafka`, the file output will allow us to know if it's a filebeat or kafka problem.

---

<div class="post-metadata">

**Author:** ![mimmus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mimmus/32/34273_2.png) [@mimmus](https://discuss.elastic.co/u/mimmus)\
**Post date:** [May 29, 2018, 8:45am UTC](https://discuss.elastic.co/t/where-are-docker-metadata/133561/3 "2018-05-29T08:45:37Z")

</div>

OK,

```
codec.format
```
 overrides all fields.  
Commenting it, all docker.\* attributes are shown.

Thanks

---

<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 26, 2018, 8:45am UTC](https://discuss.elastic.co/t/where-are-docker-metadata/133561/4 "2018-06-26T08:45:42Z")

</div>

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