AGirin
(A Girin)
June 21, 2016, 9:12pm
1
We are testing upgrade from Logstash 1.4.2 to 2.3.3 and seeing a lot of this error in the logstash.log:
{:timestamp=>"2016-06-21T15:41:12.868000-0500", :message=>"Ruby exception occurred: LogStash::Timestamp can't be coerced into Fixnum", :level=>:error}
We have a lot of configs under /etc/logstash/conf.d. Can somebody point me in the right direction on how to troubleshoot this issue?
Thanks,
Andrew
AGirin
(A Girin)
June 21, 2016, 10:05pm
2
I isolated this error to this code in our config:
ruby {
init => "require 'time'"
code => "event['[metrics][server_lag]'] = Time.now.to_i - event['@timestamp ']; event['[metrics][server_time]'] = Time.now.to_i"
}
AGirin
(A Girin)
June 21, 2016, 10:31pm
3
Fixed the code and the error wen away:
ruby {
init => "require 'time'"
code => "event['[metrics][server_lag]'] = Time.now.to_i - event['@timestamp '].to_i; event['[metrics][server_time]'] = Time.now.to_i"
}