Logstash filter with custom geopoint

i’m trying the following:

I have a custom Logstash filter and within this filter i have latitude and longitude values. I now want to create a new field (Serv_location) that uses the lat and lon values, so i can create a world-map with these geopoints in kibana. My Problem is that when i create the new field, it interprets it as a digit/number field in logstash and not as a therefore needed geopoint field.

currently my code looks like this to add the field:

 event['serv_location'] = [geo_lat.to_f, geo_lng.to_f]

what else do i need to do, to create a geopoint field?


Here is the mapping i did:

curl -XPUT 'http://localhost:5601/logstash-2015.04.16/_mapping/location' -d '
              "map_location" : 
                   "properties" : {
                   "location" : {"type" : "geo_point", "store" : true }


Source: ruby

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.