Hi,
I have a problem i want to get Longitude and Latitude from log:
"2019-10-24 12:01:06,110 [33] INFO XUDP_Endpoint.UdpEnpoint [(null)] - Data received: AS:17907,NW:77,RD:3003,DT24.10.2019 10.01.05, Longitude:10,457207 ,Latitude:63,4354383 ,Bearing:0,Accuracy:0,Lastr: 0,Distance:-1,GPS: 0,Distance: 0 "
right now i get message:
"Data received: AS:17907,NW:77,RD:3003,DT24.10.2019 10.01.05,Longitude:10,457207,Latitude:63,4354383,Bearing:0,Accuracy:0,Lastr: 0,Distance:-1,GPS: 0,Distance: 0"
and i want keep it and create two fields: "Longitude and Latitude" which then i want map to geo_point and display on map. How i suppose to do it ?
I Create this but it seems doesn't work, it even do not create a new field.
filter {
if "log4net.core" in [tags] {
grok {
match => { "message" => "(?m)^%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:thread}\] % {DATA:level} %{DATA:logger} - %{GREEDYDATA:message}" }
overwrite => [ "message" ]
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS", "yyyy-MM-dd HH:mm:ss.SSSS" ]
timezone => "Europe/Warsaw"
}
if [service.name] == "XXX" {
mutate{
add_field => { "XXXLon" => "%{message}(?<=Longitude:)[0-9]+(,[0-9]+)*" }
}
mutate{
gsub => ["XXXLon", ",", "."]
}
}