Hello,
I have a filter which were worked when I was in logstash version 2.
Now Logstash is in version 5 and something goes wrong with a ruby part (I know there is a new behaviour since the v5).
If I activate the part after "# process time" Logstash stop collecting logs and nothing appears in Kibana.
mutate {
convert => { "processtime" => "float" }
}
process time
if [uptime1] == "min" {
ruby {
code => "event.set('processtime', ( event.get('ptime1') * 60 + event.get('ptime2')))"
}
}
else if [uptime1] == "sec" {
ruby {
code => "event.set('processtime', ( event.get('ptime1') + event.get('ptime2') * 0,001 ))"
}
}
else if [uptime1] == "ms" {
ruby {
code => "event.set('processtime', ( event.get('ptime1') * 0,001 ))"
}
}
else {
ruby {
code => "event.set('processtime', 0)"
}
}
Sometimes Logstash is going "juin 02 12:31:44 frgbmelkidxl2 systemd[1]: Unit logstash.service entered failed state." after restarted it.
I really don't know what to do.
Thanks for your help.
Antoine