Set geo location from coodinates


(Roygolan1981) #1

Hi
i have latitude+latitude on logstash and i want to set geo point
i tried

add_field =>{ "geoip.location" => 13.55 }
add_field => { "geoip.location" => 5.69 }
and many more permutation of assigning the geoip.location or geoip.coordinates

on kibana i see

but on visualization i always get the same location, no matter what the coordinate are...


what am i doing wrong ?
how can i insert a Geo location from latitude+latitude??
thanks a lot
Roy


Using Latitude and Longitude data for Geohash location for tile map
(Mark Walkom) #2

Have you mapped that field to a geopoint in ES?


(Roygolan1981) #3

do you mean ::

geoip {
source => "clientip"
target => "geoip"
database => "/etc/logstash/GeoLiteCity.dat"
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
}
mutate {
convert => [ "[geoip][coordinates]", "float"]
}

??
because i dont want to use the geo from the IP
i have lat+log
what do you mean be map?


(Mark Walkom) #4

In ES you need to map that field to be a geopoint as well.


How to add geo_point type data to elasticsearch?
(Eric Kim) #5

hi, have you tried to add some filter to search(i.e. event:add_biu_propagation)? When i first use geoip the same thing appeard(every point goes to [0, 0]), but then i add some filter to search, every point goes to the right place, and then i stop search with filters (just "*"), every point came to be normal... This is weird, haven't figured it out though


(Zak Siddiqui) #6

Hi Mark, updated link for ES 2.0 is https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html
:smile:


(system) #7