# Add Docker metadata to logs shipped with filebeat?

**URL:** https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789
**Category:** Beats
**Tags:** filebeat
**Created:** [March 16, 2017, 3:14am UTC](https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789 "2017-03-16T03:14:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Josh\_Reichardt](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Josh\_Reichardt](https://discuss.elastic.co/u/Josh_Reichardt)
#### Post date: [March 16, 2017, 3:14am UTC](https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789/1 "2017-03-16T03:14:12Z")

</div>

Is there any way to attach Docker information from hosts like container images, ids, etc. with filebeat? If not, is there any other way to get this metadata from hosts into Logstash?

It looks like the Fluentd client does something like this but I haven't been able to get fluent talking to Logstash reliably.

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [March 16, 2017, 3:32am UTC](https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789/2 "2017-03-16T03:32:52Z")

</div>

If you are reading JSON logs from `/var/lib/docker/containers/` you could parse the container ID from the `source` field using Ingest Node or Logstash.

If you happen to also be running Metricbeat with the [Docker module](https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-docker.html) enabled you could correlate the ID from the logs with other info about the container like name, image, and runtime metrics.

We are going to be working on improving the whole container experience for 6.0. And adding metadata to the logs is one of things that should get easier.

---

<div class="post-metadata">

### Author: ![Josh\_Reichardt](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Josh\_Reichardt](https://discuss.elastic.co/u/Josh_Reichardt)
#### Post date: [March 16, 2017, 3:41am UTC](https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789/3 "2017-03-16T03:41:22Z")

</div>

Thanks for the quick response and the information. Any ballpark idea of how far out the 6.0 release is?

---

<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: [April 6, 2017, 3:14am UTC](https://discuss.elastic.co/t/add-docker-metadata-to-logs-shipped-with-filebeat/78789/4 "2017-04-06T03:14:16Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
