# Add docker metadata not working even after trying all possible combinations

**URL:** <https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 24, 2018, 8:58pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075 "2018-11-24T20:58:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![diya](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@diya](https://discuss.elastic.co/u/diya)\
**Post date:** [November 24, 2018, 8:58pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/1 "2018-11-24T20:58:11Z")

</div>

Am able to visualise the docker logs on kibana but with container id. I want to add container name to my logs for easy filtering.I have tried add\_docker\_metadata: ~ but in vain.I have tried differnt possible combinations but container names are not getting displayed in kibana.Is there any other way out?Please help me ASAP as am stuck in this for a long time and in a urgent need to complete the task soon.Thanks in advance.

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [November 25, 2018, 11:35pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/2 "2018-11-25T23:35:29Z")

</div>

1. Are you running the beat on the host or also in a container (as a sidecar)?
2. Please show your configuration and the logs. There is no way for us to guess what is going on.

---

<div class="post-metadata">

**Author:** ![diya](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@diya](https://discuss.elastic.co/u/diya)\
**Post date:** [November 26, 2018, 7:04am UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/4 "2018-11-26T07:04:32Z")

</div>

![34%20PM](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4af592d2ec6b43d6f28da701377ecc69b636d546.png)

Thank yu for the reply ! Please help me in resolving this issue..i want to add container name to my log files for displaying in kibana

---

<div class="post-metadata">

**Author:** ![diya](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@diya](https://discuss.elastic.co/u/diya)\
**Post date:** [November 26, 2018, 7:31am UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/5 "2018-11-26T07:31:36Z")

</div>

My filebeat service is working fine now after i made some indentation changes to filebeat.yml.The only prb that persists is related to fetching container names now..please help !

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [November 26, 2018, 2:45pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/6 "2018-11-26T14:45:58Z")

</div>

Then please provide your current config and log output as text (formatted as a code block).

There should be a log line about the processors you are loading. And it looks like you are not running on a cloud, so remove the `add_cloud_metadata` first.

---

<div class="post-metadata">

**Author:** ![diya](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@diya](https://discuss.elastic.co/u/diya)\
**Post date:** [November 26, 2018, 5:04pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/7 "2018-11-26T17:04:21Z")

</div>

I have removed it and my docker metadata is working fine..am able to fetch container names after setting the prospectors to true ..but now my filebeat is not fetching logs from all files..its fetching only from 2 containers ..though my path for logs is /var/log/docker/containers/_/_.log .Previously it was working fine..can yu suggest on this?

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [November 26, 2018, 5:14pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/8 "2018-11-26T17:14:01Z")

</div>

again, we need the logs. there you will have an entry for every file that is being collected.

taking a wild guess: only those 2 contsiners have more recent log entries. remove filebeat‘s registry file and restart it to collect everything again.

---

<div class="post-metadata">

**Author:** ![diya](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@diya](https://discuss.elastic.co/u/diya)\
**Post date:** [November 26, 2018, 6:43pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/10 "2018-11-26T18:43:42Z")

</div>

i removed registry and restarted ..still the same issue

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [November 27, 2018, 12:19am UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/11 "2018-11-27T00:19:28Z")

</div>

1. Please stop the screenshots and paste your outputs. It's a pain to read and nobody running into the same issue will be able to find it since it's not searchable text.
2. Do you happen to have tried this with an older Filebeat version and are using the index template of that? A `GET _template` in Console should show you more.
3. "when i run the filebeat in debug mode am visualising all the logs but they are not showing up in kibana" — not sure how to read this. Is it being shown correctly in Kibana or not?

---

<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:** [December 25, 2018, 1:23pm UTC](https://discuss.elastic.co/t/add-docker-metadata-not-working-even-after-trying-all-possible-combinations/158075/16 "2018-12-25T13:23:35Z")

</div>

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