elasticsearch/logstash-contrib — pull request #82 by seuf (2014-07-04 13:35:26+00:00)
Title: Updated zabbix output plugin to allow automatic item creation with zabbix api. 

I've modified the zabbix output plugin to use the [zabbixapi](https://github.com/express42/zabbixapi) gem to auto create zabbix items.
I've also added the possibility to use zabbix sender input file to specify the "@timestamp" event value.
The zabbix_sender file is flushed every N events.

To configure this plugin, just add fields in logstash filter :
```
grok {
match => [ "message", "%{SYSLOGBASE} %{DATA:data}" ]
add_tag => [ "zabbix-sender" ]
add_field => [
"zabbix_host", "%{source_host}",
"zabbix_item_key", "item.key",
"zabbix_item_name", "Item name",
"zabbix_item_description", "Item description",
"zabbix_item_value_type", 0,
"zabbix_item_data_type", 0,
"zabbix_item_unit", "record",
"send_field", "data"
]
}
```
And then configure the output like this :
```
output {
zabbix {
host => "localhost"
port => "10051"
zabbix_sender => "/usr/local/bin/zabbix_sender"
zabbix_url => "http://localhost/zabbix/api_jsonrpc.php"
zabbix_user => "api"
zabbix_pass => "password"
zabbix_sender_host => "localhost"
zabbix_user_sender_file => true
zabbix_sender_file_path => "/tmp/zabbix_sender_
zabbix_sender_file_with_timestamp => true
zabbix_sender_flush_count => 10
}
}
```
More documentation of available parameters is available in the lib/logstash/outputs/zabbix.rb source file.