logstash-plugins / logstash-output-zabbix

Zabbix output plugin for Logstash 1.5+
Apache License 2.0
24 stars 11 forks source link

Can't send numeric values through the Zabbix output #1

Closed suyograo closed 9 years ago

suyograo commented 9 years ago

from https://logstash.jira.com/browse/LOGSTASH-2223

In Logstash 1.4.1 and Zabbix 2.2, exceptions are thrown when I try to send a number to Zabbix. For example, I set the send_field value to "some-metric.count".

Logstash throws an error: {code} { :timestamp=>"2014-05-24T04:59:12.348000-0500", :message=>"Error during receiving message for sending", :event=>#<LogStash::Event:0x3f6600b8 ...>, :exception=>#<NoMethodError: undefined method empty?' for 17:Fixnum>, :backtrace=>[ "file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/1.9/shellwords.rb:75:inshellescape'", "/opt/logstash/lib/logstash/outputs/zabbix.rb:115:inreceive'", "org/jruby/RubyArray.java:1613:ineach'", "org/jruby/RubyEnumerable.java:977:ineach_with_index'", "/opt/logstash/lib/logstash/outputs/zabbix.rb:112:inreceive'", "/opt/logstash/lib/logstash/outputs/base.rb:86:inhandle'", "(eval):456:ininitialize'", "org/jruby/RubyProc.java:271:incall'", "/opt/logstash/lib/logstash/pipeline.rb:266:inoutput'", "/opt/logstash/lib/logstash/pipeline.rb:225:inoutputworker'", "/opt/logstash/lib/logstash/pipeline.rb:152:instart_outputs'" ], :level=>:warn } {code}

Am I doing something wrong, or is sending numbers to Zabbix just not supported?

untergeek commented 9 years ago

Zabbix receives numeric strings and converts internally

untergeek commented 9 years ago

This will be addressed by https://github.com/logstash-plugins/logstash-output-zabbix/pull/2

untergeek commented 9 years ago

This issue should be resolved. Re-open if necessary.