Fail to use logstash-output-gelf

Hello,

I'm trying to use logstash-output-gelf to send logs to a Graylog instance.
I've installed a fresh logstash-6.0.0 and installed the plugin with :

logstash-plugin install logstash-output-gelf

No error at this point.

I've added this block on my logstash config file (that worked out with rubydebug) :

gelf {
host => '192.168.56.101'
port => 12201
}

Logstash fails with this error when I run it :

[2017-11-30T11:11:29,507][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<NoMethodError: undefined method time' for nil:NilClass>, :backtrace=>["/tmp/logstash/logstash-core/lib/logstash/timestamp.rb:13:in<=>'", "org/jruby/RubyComparable.java:150:in =='", "/tmp/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-gelf-3.1.4/lib/logstash/outputs/gelf.rb:146:inblock in receive'", "org/jruby/RubyHash.java:1343:in each'", "/tmp/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-gelf-3.1.4/lib/logstash/outputs/gelf.rb:145:inreceive'", "/tmp/logstash/logstash-core/lib/logstash/outputs/base.rb:92:in block in multi_receive'", "org/jruby/RubyArray.java:1734:ineach'", "/tmp/logstash/logstash-core/lib/logstash/outputs/base.rb:92:in multi_receive'", "/tmp/logstash/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:22:inmulti_receive'", "/tmp/logstash/logstash-core/lib/logstash/output_delegator.rb:49:in multi_receive'", "/tmp/logstash/logstash-core/lib/logstash/pipeline.rb:538:inblock in output_batch'", "org/jruby/RubyHash.java:1343:in each'", "/tmp/logstash/logstash-core/lib/logstash/pipeline.rb:536:inoutput_batch'", "/tmp/logstash/logstash-core/lib/logstash/pipeline.rb:481:in worker_loop'", "/tmp/logstash/logstash-core/lib/logstash/pipeline.rb:439:inblock in start_workers'"]}

Any idea on what I did wrong ?

Cheers.

I've just tried with previous version (5.6.4) and it works as expected.

Hi,
I would say look to get this issue added here: https://github.com/logstash-plugins/logstash-output-gelf/issues
As this could be something that other users will be effected by. Thanks.

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