Logstash output zabbix

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.

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

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

Will have to investigate.

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