my goal is to not plot the "dot" down to spcific state or city, just country.
Sample data:
"geoip" => {
"latitude" => 44.6628,
"location" => {
"lon" => -93.1539,
"lat" => 44.6628
}
I want to replace with lon = -98.35 and lat = 39.50
I tried the following:
if [geoip][country_name] == "United States" {
mutate { replace => [ "[geoip][latitude][lat]", 39.50 ] }
mutate { replace => [ "[geoip][longitude][lon]",-98.35 ] }
mutate {
convert => { "[geoip][longitude][lat]" => "float" }
convert => { "[geoip][longitude][lon]" => "float" }
}
}
last error/exception i got is : [2019-09-25T13:04:45,361][WARN ][logstash.filters.mutate ] Exception caught while applying mutate filter {:exception=>"Could not set field 'lat' on object '41.2709' to value '39.50'.This is probably due to trying to set a field like [foo][bar] = someValuewhen [foo] is not either a map or a string"}
the same error for "lon"
how do i replace geoip.location with fix coordinates?
thanks,
Sirjune
