Logstash duration management

Halloooo, I would like to ask you how to manage, with rubydebug in logstash, durations with format like 07:22:27.

I wrote a script..

         ruby {
        #     code => "
        #             s = event.get('Logon duration')
        #             vals = s.match /(\d+):(\d+):(\d+)/
        #             if vals then
        #             seconds = vals[1].to_i*3600+vals[2].to_i*60+vals[3].to_i
        #             event.set('Logon duration', seconds)
        #             end
        #             "
	    # }
}

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