What version of Logstash are you using? The configuration you're using here seems to indicate you're using Logstash 1.4.x or older. If you're using Logstash 1.5, the Zabbix output plugin is totally changed.
I'm not sure. I rewrote the plugin to use native Ruby for Logstash 1.5.0 because the dependency on zabbix_sender was extremely slow. The old plugin was also not extensible. The pre-1.5 version of the plugin was not terrific. I recommend upgrading Logstash and using the new version of the zabbix plugin.
I will upgrade then to logstash 1.5. Could you give me simple conf example of zabbix output plugin for 1.5?
Also do i have to change any other syntax in conf file?
Error: Expected one of #, {, } at line 35, column 36 (byte 784) after output {
stdout { codec => rubydebug }
zabbix {
zabbix_host => "re01os01.net.ot.hr"
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.
I found error, it was about ","
Now I start logstash and it says "Logstash startup completed", and when i input example of Log i got message :"Skipping zabbix output; field referenced by re01os01.net.ot.hr is missing {:level=>:warn}"
I have configured re01os01.net.ot.hr as Hostname in Zabbix, and my conf looks like:
Which version of Logstash are you using? The "send_field" reference suggests 1.4.2 or older.
The version that ships with 1.5 requires you to have certain configuration values in fields, rather than as strings in the config. The config option "zabbix_host" must refer to a field name whose value will be sent as the the zabbix host in the sender packet. The same is true of the zabbix_key and zabbix_value directives.
With the configuration you provided, that implies that field "test01" will contain the value of the zabbix host, the field "Logstash" will contain the zabbix key, and the field "message" will contain the value to send associated with that key and host. Please see the documentation for more details.
The version of the plugin I am working on right now will support multiple fields per event.
I am using version 1.5, i deleted send_field as i did not know it's unnecesarry.
You are right, i want to send vaule from field "message" to host "test01", i made zabbix trapper item callet "Logstash" and key is also "Logstash".
So what do i do wrong when i get "Skipping zabbix output; field referenced by test01 is missing {:level=>:warn}"?
Thanks! Now i modified conf and i think it's OK now, but i still have issues, when i put log i got message:
"Zabbix server at 10.1.14.205 rejected all items sent. "
Indeed, this suggests that item (zabbix_key) does not exist in "host" in zabbix. Logstash will not create the items for you. You need to do this yourself before the item will "arrive" in Zabbix.
I did create zabbix trapper item, and that item is applied on my host "test01", and i still get this error.
What should i put into "allowed host" field? My zabbix is on localhost, port is default too...
I really don't understand what's wrong... I even tried to send mannually to trapper:
zabbix_sender -z 10.1.14.205 -p 10051 -s "test01" -k Logstash -o "test value" and i got "test value" message into zabbix...
Yes, i fixed that, it should not be "syslog_message", it should have been "send_field".
Now i corrected that and WHOA! No error when i put log message, BUT i still got nothing in zabbix!
Im gonna kill myself!!!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.