Solr6 & Logstash 5: timestamp error

Hi all,
I am new to logstash (and completely new to ruby) and hit a slight snag when using solr_http. Apparently the tmiestamp code around line 65 in solr_hhtp.rb has the following code:
document["@timestamp"] = document["@timestamp"].to_time.iso8601 #make the timestamp ISO
It throws an error something like:
17:42:08.943 [Ruby-0-Thread-8: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:92] WARN logstash.outputs.solrhttp - An error occurred while indexing: undefined method `to_time' for 2016-11-25T22:42:08.234Z:LogStash::Timestamp

In case anyone else hits this snag I just commented out the ".to_time.iso8601". I'm sure someone familiar with ruby can easily improve on this, but I figured I'd post what I have in the meantime.
Cheers,

Sean

1 Like

Thanks, Sean! you saved a couple of hours of my life :slight_smile:

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