Logstash Ruby code

Hi guys,

I am trying to convert time: HH:mm:ss into seconds using ruby code inside the logstash configuration file and getting error message:

_
Ruby exception occurred: uninitialized constant LogStash::Time {:level=>:error}

_

Please help me to fix this error.

What does your code look like?

Thanks Mark. I got help from someone on this.

would be nice you post here your solution for everyone :stuck_out_tongue:

  • cheers

Here is the solution

ruby {
code => "event['event_time'] = event['hour']*3600 + event['minute']*60 + event['second']"
}