# Logstash output zabbix

**URL:** <https://discuss.elastic.co/t/logstash-output-zabbix/92278>\
**Category:** Logstash\
**Created:** [July 7, 2017, 1:58pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278 "2017-07-07T13:58:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredprod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fredprod/32/19855_2.png) [@fredprod](https://discuss.elastic.co/u/fredprod)\
**Post date:** [July 7, 2017, 1:58pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278/1 "2017-07-07T13:58:40Z")

</div>

I'm trying to use this to count http error code to begin using this plugin. But I got some error, so have you some good example ?  
I have this kind of errors in logstash logs:  
[2017-07-06T15:30:48,394][WARN][logstash.outputs.zabbix] Zabbix server at localhost rejected all items sent. {:zabbix\_host=\>"xxxxxxx"}

I have this in filter type:  
if [response] \>= 400 {  
mutate {  
add\_field =\> {  
"[@metadata][error]" =\> "error[%{response},]"  
}  
add\_field =\> {  
"[@metadata][counter]" =\> "1"  
}  
}  
}  
and this for output:  
if [type] == "nginx" {  
if [response] \>= 400 {  
zabbix {  
zabbix\_server\_host =\> "localhost"  
zabbix\_host =\> "host"  
zabbix\_key =\> "[@metadata][error]"  
zabbix\_value =\> "[@metadata][counter]"  
}  
}  
}

On localhost I have zabbix proxy and logstash. I try a simple zabbix\_sender with same parameter and it's working.

---

<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:** [July 7, 2017, 3:56pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278/2 "2017-07-07T15:56:11Z")

</div>

Which version of Zabbix are you using? It may be that the newer 3.2 version is not working with the Logstash plugin.

---

<div class="post-metadata">

**Author:** ![fredprod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fredprod/32/19855_2.png) [@fredprod](https://discuss.elastic.co/u/fredprod)\
**Post date:** [July 10, 2017, 1:34pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278/3 "2017-07-10T13:34:33Z")

</div>

Yes, I'm using zabbix in version 3.2.6, is there a way to make it work with this version or not?

---

<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:** [July 10, 2017, 1:47pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278/4 "2017-07-10T13:47:08Z")

</div>

Will have to investigate.

---

<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:** [August 7, 2017, 1:47pm UTC](https://discuss.elastic.co/t/logstash-output-zabbix/92278/5 "2017-08-07T13:47:18Z")

</div>

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