# Logstash Conf file (geo location) - coordinates points always to the center of the Kibana tile map

**URL:** <https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275>\
**Category:** Logstash\
**Created:** [November 10, 2015, 6:52pm UTC](https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275 "2015-11-10T18:52:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luis.carvalho](https://avatars.discourse-cdn.com/v4/letter/l/d07c76/32.png) [@luis.carvalho](https://discuss.elastic.co/u/luis.carvalho)\
**Post date:** [November 10, 2015, 6:52pm UTC](https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275/1 "2015-11-10T18:52:39Z")

</div>

Hi,  
I´m having some trouble configuring the logstash conf file with geo location. I have in my mapping:

"cpe\_location" : {  
"properties" : {  
"location" : { "type" : "geo\_point" }  
}  
}

And I try in the filter part:

mutate {  
add\_filed =\> { "location" =\> "lat,lon" }  
}

or

mutate {  
add\_filed =\> { "[cpe\_location][location]" =\> lat }  
add\_filed =\> { "[cpe\_location][location]" =\> lon }  
}

I try both ways as strings or convert to float, but none of them work. The geo location points to the center of the kibana tile map.

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 11, 2015, 6:33am UTC](https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275/2 "2015-11-11T06:33:23Z")

</div>

Neither of those mutate's look correct, the first one won't work as you aren't referring to the fields correctly, the second one will just overwrite the location (and you aren't referencing the fields right either).

Try something like this, just adapt to your fields;

```auto
  mutate {
    add_field => {
      "coords" => "%{LATITUDE}"
      "tmplat" => "%{LONGITUDE}"
    }
  }
  mutate {
    merge => ["coords", "tmplat"]
  }
  mutate {
    convert => ["coords", "float"]
    remove_field => ["tmplat", "LONGITUDE", "LATITUDE"]
  }

```

---

<div class="post-metadata">

**Author:** ![luis.carvalho](https://avatars.discourse-cdn.com/v4/letter/l/d07c76/32.png) [@luis.carvalho](https://discuss.elastic.co/u/luis.carvalho)\
**Post date:** [November 11, 2015, 11:58am UTC](https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275/3 "2015-11-11T11:58:46Z")

</div>

Thanks mate! I have another doubt. According to your example, what is the correct way to add the coords values to the geo\_point field?

mutate {  
add\_field =\> { "[cpe\_location][location]" =\> "coords" }  
}

or

mutate {  
add\_field =\> { "location" =\> "coords" }  
}

Since my geo\_point field mapping is:

"mappings" : {  
"cpe\_location" : {  
"properties" : {  
"location" : {  
"type" : "geo\_point"  
}  
}  
}  
}

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:** [July 6, 2017, 5:23am UTC](https://discuss.elastic.co/t/logstash-conf-file-geo-location-coordinates-points-always-to-the-center-of-the-kibana-tile-map/34275/4 "2017-07-06T05:23:11Z")

</div>


