# Lists in Kubernetes Hints Based Autodiscover Pod Annotations

**URL:** https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817
**Category:** Beats
**Tags:** metricbeat
**Created:** [October 31, 2018, 10:58am UTC](https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817 "2018-10-31T10:58:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bagratte](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bagratte/32/37155_2.png) [@bagratte](https://discuss.elastic.co/u/bagratte)
#### Post date: [October 31, 2018, 10:58am UTC](https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817/1 "2018-10-31T10:58:34Z")

</div>

I can't seem to be able to use lists in pod annotations. This doesn't work at all (i. e. no metrics are being collected at all by logstash module):

```
annotations:
  co.elastic.metrics/module: logstash
  co.elastic.metrics/metricsets: '["node", "node_stats"]'
  co.elastic.metrics/hosts: '["logstash-logging-0.logstash-logging-discovery:9600", "logstash-logging-1.logstash-logging-discovery:9600"]'
  co.elastic.metrics/period: 10s

```

Whereas this works fine:

```
annotations:
  co.elastic.metrics/module: logstash
  co.elastic.metrics/metricsets: node
  co.elastic.metrics/hosts: logstash-logging-0.logstash-logging-discovery:9600
  co.elastic.metrics/period: 10s

```

Can we not put lists in those annotations?

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [October 31, 2018, 2:22pm UTC](https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817/2 "2018-10-31T14:22:35Z")

</div>

Hi @bagratte and welcome 🙂

You should be able to use comma-separated lists in `metricsets` and `hosts` annotations:

```auto
annotations:
  co.elastic.metrics/module: logstash
  co.elastic.metrics/metricsets: 'node,node_stats'
  co.elastic.metrics/hosts: 'logstash-logging-0.logstash-logging-discovery:9600,logstash-logging-1.logstash-logging-discovery:9600'
  co.elastic.metrics/period: 10s

```

---

<div class="post-metadata">

### Author: ![bagratte](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bagratte/32/37155_2.png) [@bagratte](https://discuss.elastic.co/u/bagratte)
#### Post date: [November 2, 2018, 7:05am UTC](https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817/3 "2018-11-02T07:05:40Z")

</div>

Yeah, that worked. Thank you very much!

---

<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: [November 30, 2018, 7:05am UTC](https://discuss.elastic.co/t/lists-in-kubernetes-hints-based-autodiscover-pod-annotations/154817/4 "2018-11-30T07:05:44Z")

</div>

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