Convert my address book into Geohash to display data in Kibana Tile Map Visualization

Hi All

I have a Elastic Data store which hold the mapping like this

Address1, Address2, City,POSTAL_CODE, Country

Now I want to show this data in Kibana Tile Map, how can i convert my Address database to Geohash columns.(mappings)

Any clue will be greatly appreciated

Regards
Ritesh

You need to find a way to provide geo point coordinates (lat, lon). Kibana can not guess that for you.

1 Like

Hi Ritesh,

I achieved this by downloading GeoLiteCity.dat from "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz" . It is a database which will assign (Lat,Log) to your IPs.Once downloaded and unzipped you need to create a logstash conf file , something like

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

}

In your case clientip would be Address1 or address2 . Now , in kibana in the Aggregation drop-down, select Geohash and In the Field drop-down, select geoip.location.

Take some help from "https://www.digitalocean.com/community/tutorials/how-to-map-user-location-with-geoip-and-elk-elasticsearch-logstash-and-kibana". A very nice tutorial by Mitchell Anicas.

Hope this will help you to start .

I would love to do something similar. I have a City field in my elasticsearch documents and I would love to generate lat and lon from the city field so I can view in Kibana. How is this possible?

Sample document:
{ "name" : "Lekan", "city" : "Abeokuta" }

What you are trying to do is a form of enrichment called geocoding. Google it and you'll find a lot of options.
There are online services eg Google's one or there are datasets you can download to help geocode locally eg Geonames.

2 Likes

You can also check How to create line from source to destination in MAP
but this is again from Long , Lat fields to geo location . In your case you need from Country to long lat so i would go with Mark's idea.