# Zabbix and multi\_value key

**URL:** <https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584>\
**Category:** Logstash\
**Created:** [September 15, 2016, 8:26am UTC](https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584 "2016-09-15T08:26:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karnak](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@karnak](https://discuss.elastic.co/u/karnak)\
**Post date:** [September 15, 2016, 8:26am UTC](https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584/1 "2016-09-15T08:26:30Z")

</div>

Hi all,  
I'm trying to setup the zabbix plugin with the multi\_values key without success. This is the config

> 

filter {  
add\_field =\> { "multivalue" =\> ["foo", "bar"] }  
}

> 

output {  
zabbix{  
zabbix\_server\_host =\> "zabbix\_host"  
zabbix\_server\_port =\> "10051"  
zabbix\_host =\> host  
multi\_value =\> multivalue  
}

Unfortunately, I'm receiving the following error:

> 

[...]  
config LogStash::Outputs::Zabbix/@multi\_value = ["multivalue"] {:level=\>:debug, :file=\>"logstash/config/mixin.rb", :line=\>"154", :method=\>"config\_init"}  
[...]  
Pipeline aborted due to error {:exception=\>"LogStash::ConfigurationError", :backtrace=\>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-zabbix-3.0.1/lib/logstash/outputs/zabbix.rb:101:in `register'"[...]

It seems as if instead of using the field is using the field's name "multivalue"

I'm new to logstash, maybe the

> 

add\_field =\> { "multivalue" =\> ["foo", "bar"] }

is not valid?  
How can I create the array in the filter section?

Thanks

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [September 15, 2016, 2:48pm UTC](https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584/2 "2016-09-15T14:48:12Z")

</div>

You may be overthinking this. `multi_value` as a setting needs to be _an array of field names,_ not a field which has an array value. See: [Zabbix output plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-zabbix.html#plugins-outputs-zabbix-multi_value)

> Use the `multi_value` directive to send multiple key/value pairs. This can be thought of as an array, like:
> 
> ```auto
> 
> ```

[zabbix\_key1, zabbix\_value1, zabbix\_key2, zabbix\_value2, ... zabbix\_keyN, zabbix\_valueN]

> ```auto
> 
> ```

…where `zabbix_key1` is an instance of `zabbix_key`, and `zabbix_value1` is an instance of `zabbix_value`. If the field referenced by any `zabbix_key` or `zabbix_value` does not exist, that entry will be ignored.

---

<div class="post-metadata">

**Author:** ![karnak](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@karnak](https://discuss.elastic.co/u/karnak)\
**Post date:** [September 15, 2016, 3:35pm UTC](https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584/3 "2016-09-15T15:35:43Z")

</div>

> [@theuntergeek](#):
>
> You may be overthinking this. multi\_value as a setting needs to be an array of field names, not a field which has an array value. See: [Zabbix output plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-zabbix.html#plugins-outputs-zabbix-multi_value)

Ok thanks, I was hoping to use a field even then (maybe it could be an improvement?)  
I am trying to use logstash as a link between collectd and Zabbix.. Is working, but I was hoping it was more linear. Thanks again

---

<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 6, 2017, 4:38am UTC](https://discuss.elastic.co/t/zabbix-and-multi-value-key/60584/4 "2017-07-06T04:38:16Z")

</div>

Closed on July 6, 2017, 4:38am UTC


