# How to add the swarm cluster metadata?

**URL:** <https://discuss.elastic.co/t/how-to-add-the-swarm-cluster-metadata/188789>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 3, 2019, 5:59pm UTC](https://discuss.elastic.co/t/how-to-add-the-swarm-cluster-metadata/188789 "2019-07-03T17:59:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex16](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@alex16](https://discuss.elastic.co/u/alex16)\
**Post date:** [July 3, 2019, 5:59pm UTC](https://discuss.elastic.co/t/how-to-add-the-swarm-cluster-metadata/188789/1 "2019-07-03T17:59:27Z")

</div>

Hello,  
I want to collect logs from services with swarm cluster?  
But I can't add a label com.docker.swarm.service.name .  
Maybe there is a workaround?  
Thank you!

---

<div class="post-metadata">

**Author:** ![pmercado](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pmercado](https://discuss.elastic.co/u/pmercado)\
**Post date:** [July 3, 2019, 7:14pm UTC](https://discuss.elastic.co/t/how-to-add-the-swarm-cluster-metadata/188789/2 "2019-07-03T19:14:27Z")

</div>

Hi @alex16,

I'm not very familiar with swarm and there is no native support at beats, but probably you can take advantage of `add_docker_metadata` processor to gather the labels that should tell you the service a pod belongs to.

Have checked this out? --\> [https://www.elastic.co/guide/en/beats/filebeat/master/add-docker-metadata.html](https://www.elastic.co/guide/en/beats/filebeat/master/add-docker-metadata.html)

---

<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:** [July 31, 2019, 7:14pm UTC](https://discuss.elastic.co/t/how-to-add-the-swarm-cluster-metadata/188789/3 "2019-07-31T19:14:40Z")

</div>

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