A decent tutoral is

cd /etc/logstash
sudo curl -O ""
sudo gunzip GeoLiteCity.dat.gz

Note that the GeoLite databases are updated by MaxMind on the first Tuesday of each month. Therefore, if you want to always have the latest database, you should set up a cron job that will download the database once a month.

  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"]