# ELK and mysql geopoint

**URL:** <https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888>\
**Category:** Logstash\
**Created:** [July 30, 2019, 12:10pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888 "2019-07-30T12:10:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_MORVAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axel_morvan/32/46439_2.png) [@Axel\_MORVAN](https://discuss.elastic.co/u/Axel_MORVAN)\
**Post date:** [July 30, 2019, 12:10pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/1 "2019-07-30T12:10:13Z")

</div>

Hello,

I need to create a kibana dashboard with a coordinate map.  
I import data from a mysql database with latitude and longitute.  
But I can't create a field type "geo\_point", and after a long search I come to ask you for help.

thank you.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 30, 2019, 1:48pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/2 "2019-07-30T13:48:51Z")

</div>

Unless your field is called geoip you will need a template that defines your field to be a geo\_point. [This](https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199/4) thread might help you. (The details of mappings have changed a little since I wrote that.)

---

<div class="post-metadata">

**Author:** ![Axel\_MORVAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axel_morvan/32/46439_2.png) [@Axel\_MORVAN](https://discuss.elastic.co/u/Axel_MORVAN)\
**Post date:** [July 30, 2019, 2:00pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/3 "2019-07-30T14:00:41Z")

</div>

thank you for your reply but when i try to put the template i got this error  
`Root mapping definition has unsupported parameters: [_default_ : {properties={location={type=geo_point}}}]`

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 30, 2019, 2:08pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/4 "2019-07-30T14:08:26Z")

</div>

That's now an elasticsearch question. I cannot test this but I think it would now be

```
{
  "index_patterns": ["someIndex*"],
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

```

If that does not work I would head over to the elasticsearch forum and ask what the mapping should look like.

---

<div class="post-metadata">

**Author:** ![Axel\_MORVAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axel_morvan/32/46439_2.png) [@Axel\_MORVAN](https://discuss.elastic.co/u/Axel_MORVAN)\
**Post date:** [July 30, 2019, 2:12pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/5 "2019-07-30T14:12:04Z")

</div>

it's ok with that but now when i import date i have this error  
`elasticsearch - Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"196366", :_index=>"index", :_type=>"reporting", :routing=>nil}, #<LogStash::Event:0xa9f0db3>], :response=>{"index"=>{"_index"=>"index", "_type"=>"reporting", "_id"=>"196366", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"mapper [location] of different type, current_type [geo_point], merged_type [ObjectMapper]"}}}}`

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 30, 2019, 2:21pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/6 "2019-07-30T14:21:03Z")

</div>

Not sure, I would take it over to the elasticsearch forum.

---

<div class="post-metadata">

**Author:** ![Axel\_MORVAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axel_morvan/32/46439_2.png) [@Axel\_MORVAN](https://discuss.elastic.co/u/Axel_MORVAN)\
**Post date:** [July 30, 2019, 2:42pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/7 "2019-07-30T14:42:35Z")

</div>

Ok thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 27, 2019, 2:42pm UTC](https://discuss.elastic.co/t/elk-and-mysql-geopoint/192888/8 "2019-08-27T14:42:36Z")

</div>

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