Ruby exception with no message

I was trying to use ruby filter to calculate time difference:

ruby{
  code => "require 'date'; 
  event.set('landing_delay',((
        DateTime.parse(event.get('landing_t')) - 
        DateTime.parse(event.get('t'))
      ) * 24 * 60 * 60
    ).to_i
  )"
}

But sometimes it works, sometimes it returns error:

[ERROR][logstash.filters.ruby ] Ruby exception occurred:

with no detailed information.

I'm using logstash 6.4.2 on docker, anyone can help? Many thanks!

1 Like

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