Latitude and Longitude Field conversion to Geo Point

Hi ,

I have uploaded my data file using logstash. Logstash successfully uploaded the following data like PoS, Cityname, Lattitude and Longitude. Now my problem is how to create index so that I can visualise them on Geo Map. My data is of 2Gb and it is daily updating.

LogStash's config file:

input {
file {
path => "F:/POS.txt"
start_position => "beginning"
sincedb_path => "/dev/null"
type => "pos"
}
}
filter {
csv {
separator => "|"
#"Name","POS","CityName", "Latitude","Longitude", "Date"
columns => ["Name","POS","CityName", "Latitude","Longitude", "Date"]
}
}
output {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "pos"
}
stdout {}
}

and I have to visualise it on Kibana's Geo Map. Please help me in this regard.

Hi Praveen,

The datatype needs to be of geotype, you can read more about it here.

Here is an example:

PUT discuss_72365
{
  "mappings": {
    "locations": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

PUT discuss_72365/locations/1
{
  "location": [ -71.34, 41.12 ] 
}

After this, I can then add my index pattern to Kibana and create a timemap visualization on the location field.

Can you check the mapping and let me know what it is?

GET /pos/_mapping

It also appears there is a geoIP filter for Logstash: https://www.elastic.co/guide/en/logstash/current/plugins-filters-geoip.html

Thanks @tsmalley but i am able to resolve the issue with the following link:

It was my mistake and rectify according to the answer given there. It works like a charm.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.