Hello experts,
I'm still learning about ELK. last week i set up my ELK lab. And I got error in my Logstash. I'm using logstash 7.5.1. I would like to parse through all fields of my Logstash and convert field starting with the word "time" to float. This is my configuration
filter {
date {
match => [ "timestamp", "ISO8601" ]
}
ruby {
code => "if event['event_type'] == 'fileinfo'; event['fileinfo']['type']=event['fileinfo']['magic'].to_s.split(',')[0]; end;"
}
if [src_ip] {
if ![geoip.ip] {
if [src_ip] {
geoip {
source => "src_ip"
target => "geoip"
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
}
mutate {
convert => [ "[geoip][coordinates]", "float" ]
}
}
}
}
}
Any help would be great, as I have been stuck with this for the entire week.
Thanks