# Problem with GeoIP using filebeat-\>logstash-\>ES-\>Kibana (No geo\_point type)

**URL:** https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763
**Category:** Logstash
**Created:** [March 15, 2017, 8:23pm UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763 "2017-03-15T20:23:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zokratez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zokratez/32/5974_2.png) [@zokratez](https://discuss.elastic.co/u/zokratez)
#### Post date: [March 15, 2017, 8:23pm UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763/1 "2017-03-15T20:23:56Z")

</div>

This is my config:

```
filter {
  if [type] == "apache-access" {
    grok {
      match => ["message", "%{IP:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:apache_timestamp}\] \"%{WORD:method} /%{NOTSPACE:request_page} HTTP/%{NUMBER:http_version}\" %{NUMBER:server_response} " ]
      add_tag => ["web", "apache"]
    }
    geoip {
      source => "clientip"
      target => "geoip"
      database => "/etc/logstash/GeoLite2-City.mmdb"
      add_field => ["[geoip][coordinates]", "%{[geoip][longitude]}" ]
      add_field => ["[geoip][coordinates]", "%{[geoip][latitude]}" ]
    }
    mutate {
      convert => ["[geoip][coordinates]", "float"]
    }

  }
}

filter {
  if [type] == "apache-error" {
    grok {
      match => { "message" => "%{COMBINEDAPACHELOG}" }
    }
  }
}

```

filebeat.yml

```
{
  "mappings": {
    "_default_": {
      "_all": {
        "norms": false
      },
      "_meta": {
        "version": "5.2.0"
      },
      "dynamic_templates": [
        { 
          "strings_as_keyword": {
            "mapping": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "match_mapping_type": "string"
          }
        }
      ],
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "beat": {
          "properties": {
            "hostname": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "name": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "version": {
              "ignore_above": 1024,
              "type": "keyword"
            }
          }
        },
        "input_type": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "message": {
          "norms": false,
          "type": "text"
        },
        "meta": {
          "properties": {
            "cloud": {
              "properties": {
                "availability_zone": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "instance_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "machine_type": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "project_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "provider": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "region": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            }
          }
        },
        "offset": {
          "type": "long"
        },
        "source": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "tags": {
          "ignore_above": 1024,
          "type": "keyword"
        },
        "type": {
          "ignore_above": 1024,
          "type": "keyword"
        }
      }
    }
  },
  "order": 0,
  "settings": {
    "index.mapping.total_fields.limit": 10000,
    "index.refresh_interval": "5s"
  },
  "template": "filebeat-*"
}

```

I had refresh de index fields... I readed ALL the threads. I dont know what to do.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![zokratez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zokratez/32/5974_2.png) [@zokratez](https://discuss.elastic.co/u/zokratez)
#### Post date: [March 15, 2017, 8:25pm UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763/2 "2017-03-15T20:25:41Z")

</div>

This is the map in the index...

```
"geoip" : {
            "properties" : {
              "city_name" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "continent_code" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "coordinates" : {
                "type" : "float"
              },
              "country_code2" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "country_code3" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "country_name" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "dma_code" : {
                "type" : "long"
              },
              "ip" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "latitude" : {
                "type" : "float"
              },
              "location" : {
                "type" : "float"
              },
              "longitude" : {
                "type" : "float"
              },
              "postal_code" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "region_code" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "region_name" : {
                "type" : "keyword",
                "ignore_above" : 1024
              },
              "timezone" : {
                "type" : "keyword",
                "ignore_above" : 1024
              }
            }
          },
```

---

<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: [March 16, 2017, 7:44am UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763/3 "2017-03-16T07:44:01Z")

</div>

> [@zokratez](#):
>
> add\_field =\> ["[geoip][coordinates]", "%{[geoip][longitude]}" ]  
> add\_field =\> ["[geoip][coordinates]", "%{[geoip][latitude]}" ]

Don't bother with this, the plugin creates a geoip.location field that should map correctly.

---

<div class="post-metadata">

### Author: ![zokratez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zokratez/32/5974_2.png) [@zokratez](https://discuss.elastic.co/u/zokratez)
#### Post date: [March 16, 2017, 1:36pm UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763/4 "2017-03-16T13:36:09Z")

</div>

Thanks so much! Now its working. I just deleted all the old indexes for incompatibiliy types and now work fine.

---

<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: [April 13, 2017, 1:36pm UTC](https://discuss.elastic.co/t/problem-with-geoip-using-filebeat-logstash-es-kibana-no-geo-point-type/78763/5 "2017-04-13T13:36:11Z")

</div>

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