Create map layer from longitude and latitude

I want to create a kibana map using two float fields: lat and lon (latitude and longitude), but when i try to create a map in Kibana I can't do it because i don't have a geoip location field. How can i solve it?

You need a geo_point field in elasticsearch, you do not need a geoip field. You will need a template to tell elasticsearch that a field is a geo_point. The default template includes an example of how to do that.

Sorry Badger, but the second link not works.

Yes, it got renamed to support ecs compatability. I fixed the link. It shows how to create a geo_ip, but as I said, you only need the part of that which creates a geo_point.

Sorry but i can't understand. I go to the kibana dev tools and i ran the following request:

PUT _template/geotemplate
{
  "index_patterns": [
    "alldevices"
  ],
  "settings": {},
  "mappings": {
    "properties": {
      "geoLocation": {
        "type": "geo_point"
      }
    }
  },
  "aliases": {}
}

the request goes well, but when i go to the index pattern, i refresh "alldevices" but nothing change, geoLocation is string type.

geoLocation is the field that I have created in the logstash pipeline and it is in the form of lon,lat

A mapping will not re-index existing fields. It is only applied when fields are created.

ok, so i have to delete index pattern, launch the request and recreate the index?

That should work, yes.

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