Hello,
I am trying to convert three separate fields for hour minute and second to one in seconds so I have dome some research and found
if [hour] and [minute] and [second] {
ruby {
code => "event['duration_in_seconds'] = event['hour'].to_i * 3600 + event['minute'].to_i * 60 + event['second']"
}
}
but when I run logstash I get the error
[ERROR][logstash.filters.ruby ] Ruby exception occurred: undefined method `[ ]' for #<LogStash::Event:
any help would be appreciated