# SOLVED: How to implement Geoip with new index

**URL:** https://discuss.elastic.co/t/solved-how-to-implement-geoip-with-new-index/49664
**Category:** Logstash
**Created:** [May 10, 2016, 1:52pm UTC](https://discuss.elastic.co/t/solved-how-to-implement-geoip-with-new-index/49664 "2016-05-10T13:52:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Clement\_Ros](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clement_ros/32/6198_2.png) [@Clement\_Ros](https://discuss.elastic.co/u/Clement_Ros)
#### Post date: [May 10, 2016, 1:52pm UTC](https://discuss.elastic.co/t/solved-how-to-implement-geoip-with-new-index/49664/1 "2016-05-10T13:52:14Z")

</div>

Hi,

I use logstash 2.2 and elasticsearch 2.2 and Kibana 4.4

My problem is that the Geoip fields do not appear in geoip Kibana. I use a specific index named scarlette-\*.

here is my logstash filter:

```
 geoip {
                        source => "ip_client"
                        target => "geoip"
                        database => "/etc/logstash/GeoLiteCity.dat"
                        add_field => ["[geoip][coordinates]", "%{[geoip][longitude]}" ]
                        add_field => ["[geoip][coordinates]", "%{[geoip][latitude]}" ]
                }
    
                mutate {
                        convert => ["[geoip][coordinates]", "float"]
                }

```

My field "ip\_client" is a string.

here is my index template :

```
{
  "mappings": {
    "_default_": {
      "_all": {
        "enabled": true,
        "norms": {
          "enabled": false
        }
      },
      "dynamic_templates": [
        {
          "template1": {
            "mapping": {
              "doc_values": true,
              "ignore_above": 1024,
              "index": "not_analyzed",
              "type": "{dynamic_type}"
            },
            "match": "*"
          }
        }
      ],
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "message": {
          "type": "string",
          "index": "analyzed"
        },
        "offset": {
          "type": "long",
          "doc_values": "true"
        },
        "geoip": {
          "type": "object",
          "dynamic": true,
          "properties": {
            "location": {
              "type": "geo_point"
            }
          }
        }
      }
    }
  },
  "settings": {
    "index.refresh_interval": "5s"
  },
  "template": "scarlette-*"
}

```

thanks

---

<div class="post-metadata">

### Author: ![Clement\_Ros](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clement_ros/32/6198_2.png) [@Clement\_Ros](https://discuss.elastic.co/u/Clement_Ros)
#### Post date: [May 11, 2016, 12:54pm UTC](https://discuss.elastic.co/t/solved-how-to-implement-geoip-with-new-index/49664/2 "2016-05-11T12:54:15Z")

</div>

i figured out that i was using a bad template.

To fixed that probleme i rename my indice `"scarlette-*"` in `"logstash-scarlette-*"`.

---

<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, 4:58am UTC](https://discuss.elastic.co/t/solved-how-to-implement-geoip-with-new-index/49664/3 "2017-07-06T04:58:12Z")

</div>


