# Use an array as parameter

**URL:** <https://discuss.elastic.co/t/use-an-array-as-parameter/253686>\
**Category:** Logstash\
**Created:** [October 29, 2020, 12:00pm UTC](https://discuss.elastic.co/t/use-an-array-as-parameter/253686 "2020-10-29T12:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tallavi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tallavi/32/73613_2.png) [@tallavi](https://discuss.elastic.co/u/tallavi)\
**Post date:** [October 29, 2020, 12:00pm UTC](https://discuss.elastic.co/t/use-an-array-as-parameter/253686/1 "2020-10-29T12:00:53Z")

</div>

Hi all,

I'm using [Datadog Metrics Plugin](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-datadog_metrics.html).

I want to use tags. I have an array of strings in my event called "datadog.tags" which I want to pass to dd\_tags, which gets an array of strings:

```auto
datadog_metrics {
  api_key => "MyApiKey"
  dd_tags => "%{datadog.tags}"
  metric_name => "%{datadog.metric.name}"
  metric_type => "gauge"
  metric_value => "%{datadog.metric.value}"
  queue_size => 100
  timeframe => 60
}

```

Since it’s in parenthesis, naturally, the plugin gets a string instead of an array. Is there still no way to pass the array?

I also tried [datadog][tags] or [datadog.tags], like it’s being used in conditionals, but to no avail.

I read in a post 4 years ago that there's no way to reference an array in logstash. Is it still relevant today? Can anyone think of a workaround? The only workaround I can think of is modifying the plugin to get a comma delimited string, and do the splitting on the ruby side.

Thanks in advance,

Tal

---

<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 26, 2020, 12:00pm UTC](https://discuss.elastic.co/t/use-an-array-as-parameter/253686/2 "2020-11-26T12:00:55Z")

</div>

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