# Does logstash map to geo\_point type when parsing geoip?

**URL:** https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776
**Category:** Logstash
**Created:** [July 11, 2020, 2:43am UTC](https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776 "2020-07-11T02:43:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [July 11, 2020, 2:43am UTC](https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776/1 "2020-07-11T02:43:12Z")

</div>

> ```
> input{
> kafka{
> codec => "json"
> decorate_events => true
> ......
> }
> }
> 
> filter {
> geoip {
> source => "remote_addr"
> target => "geoip"
> add_field => ["[geoip][coordinates]","%{[geoip][longitude]}"]
> add_field => ["[geoip][coordinates]","%{[geoip][latitude]}"]
> }
> mutate {
> convert => {
> "[geoip][coordinates]" => "float"
> }
> }
> }
> 
> output {
> elasticsearch {
> hosts => ["192.168.10.139:9200","192.168.10.140:9200","192.168.10.141:9200"]
> index => "nginx"
> }
> }
> }
> 
> ```

I saw someone mentioned a long time ago, is there any way to make the custom index use the default logstash template?

> [@Geoip filter not creating type geo\_point](https://discuss.elastic.co/t/geoip-filter-not-creating-type-geo-point/34873/2):
>
> Are you using the default index name of logstash-YYYY.MM.DD? If not, then the [default template, which maps the geo\_point for you](https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/master/lib/logstash/outputs/elasticsearch/elasticsearch-template.json#L85), is not being used. You could always borrow from this template to make yours map properly. Unfortunately, you'll have to re-index or wait until the next rollover to see the mapping change.

---

<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 11, 2020, 5:25pm UTC](https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776/2 "2020-07-11T17:25:36Z")

</div>

> [@wajika](#):
>
> is there any way to make the custom index use the default logstash template?

Take the [default template](https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/master/lib/logstash/outputs/elasticsearch/elasticsearch-template-es7x.json), update the value of index\_patterns to match your custom index name, and [PUT it](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html) into elasticsearch.

---

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [July 13, 2020, 5:28am UTC](https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776/3 "2020-07-13T05:28:48Z")

</div>

Solved the problem, thank you

---

<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 10, 2020, 5:28am UTC](https://discuss.elastic.co/t/does-logstash-map-to-geo-point-type-when-parsing-geoip/240776/4 "2020-08-10T05:28:51Z")

</div>

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