Using googlemaps geocoding API for address->geopoint


(Meenal Luktuke) #1

Hi,

I have a dataset which contains address, city etc. Using google's geocoding API in runtime, I would like to get geo-coordinates so that I can plot this on tilemap.

But how to invoke this command in Logstash?

For example:
Step-1: Parse event in Logstash
#input
Logstash event:
Place: Bangalore
Country: India
<>

#using kv filter, get place and country

Pass this to google API

https://maps.googleapis.com/maps/api/geocode/json?address=Bangalore+India&key=<YOUR_API_KEY>

#Response gives lat, long
#Store below information in Elasticsearch

Place: Bangalore
Country: India
Location:12.9715987, 77.5945627
<>

I saw Convert my address book into Geohash to display data in Kibana Tile Map Visualization But geolite is now legacy, no updates recently.

Please let me know if this is possible in ES/Logstash.


(Magnus B├Ąck) #2

There's no stock filter for doing specifically this or more generically making REST lookups on one or more fields and storing the results. However, writing a custom filter for this should be easy.


(Meenal Luktuke) #3

Okay, will give it a try :slight_smile:


(Laptop Data) #4

Hi @Meenal.Luktuke, I am phasing same issue now to get latitude and logitude from the location.
Can you please help me out here if you find any solution.


(system) #5