logstash-plugins / logstash-output-influxdb

Apache License 2.0
58 stars 77 forks source link

NoMethodError: undefined method `gsub!' for "2014-12-25T23:08:13.607Z":LogStash::Timestamp #3

Closed nikita-leonov closed 9 years ago

nikita-leonov commented 9 years ago

I am using logstash-1.5.0.beta1 and trying to send following data to influx. {"message":"d","@version":"1","@timestamp":"2014-12-25T23:08:13.607Z","host":"Nikitas-MacBook-Pro.local"}

Influx plugin crashes with following error: NoMethodError: undefined method `gsub!' for "2014-12-25T23:08:13.607Z":LogStash::Timestamp _parse at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/vendor/jruby/lib/ruby/1.9/date/format.rb:839 parse at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/vendor/jruby/lib/ruby/1.9/time.rb:265 to_epoch at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-0.1.1/lib/logstash/outputs/influxdb.rb:225 receive at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/vendor/bundle/jruby/1.9/gems/logstash-output-influxdb-0.1.1/lib/logstash/outputs/influxdb.rb:133 handle at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/lib/logstash/outputs/base.rb:86 initialize at (eval):28 call at org/jruby/RubyProc.java:271 output at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/lib/logstash/pipeline.rb:272 outputworker at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/lib/logstash/pipeline.rb:231 start_outputs at /Users/nikita/Projects/bi/logstash-1.5.0.beta1/lib/logstash/pipeline.rb:160

Any ideas what it could be?

nikita-leonov commented 9 years ago

Here is a config that I am currently using. I know that data_points required, however the crash happens even before that.

input { stdin { } }

output { stdout { codec => json }

influxdb { host => "192.168.59.103" db => "analytics" user => "root" password => "root" data_points => { "message" => message } codec => json } }

suyograo commented 9 years ago

Merged in https://github.com/logstash-plugins/logstash-output-influxdb/pull/4