# No geo\_point fields logstash 6

**URL:** <https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788>\
**Category:** Logstash\
**Created:** [December 14, 2017, 2:24pm UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788 "2017-12-14T14:24:51Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 28, 2018, 9:44pm UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/21 "2018-01-28T21:44:12Z")

</div>

This is the structure you need:

```nohighlight
mappings
  name-of-document-type
    properties
      geoip
        properties
          clientip
          ...

```

You currently have:

```nohighlight
mappings
  geoip
    properties
      clientip
      ...

```

---

<div class="post-metadata">

**Author:** ![prophoto](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@prophoto](https://discuss.elastic.co/u/prophoto)\
**Post date:** [January 29, 2018, 2:39pm UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/22 "2018-01-29T14:39:18Z")

</div>

Can that 'name-of-document-type' be any arbitrary name I choose or is it specific?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 29, 2018, 5:26pm UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/23 "2018-01-29T17:26:01Z")

</div>

It should match the type of your documents, but that can basically be any string.

---

<div class="post-metadata">

**Author:** ![prophoto](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@prophoto](https://discuss.elastic.co/u/prophoto)\
**Post date:** [January 31, 2018, 10:14pm UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/24 "2018-01-31T22:14:26Z")

</div>

Eeh still didn't work with this.

PUT \_template/apache-template  
{  
"index\_patterns" : ["apache\*"],  
"doc" : {  
"geoip" : {  
"dynamic": true,  
"properties" : {  
"clientip": { "type": "ip" },  
"location" : { "type" : "geo\_point" },  
"latitude" : { "type" : "half\_float" },  
"longitude" : { "type" : "half\_float" }  
}  
}  
}  
}

Here is a full record.

{  
"\_index": "apache-access\_2018.01.31",  
"\_type": "doc",  
"\_id": "4vVETmEB3Wi\_gLjvSceJ",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"geoip": {  
"ip": "177.37.134.130",  
"longitude": -39.3346,  
"coordinates": [  
-39.3346,  
-5.1342  
],  
"region\_name": "Ceara",  
"city\_name": "Quixeramobim",  
"country\_code2": "BR",  
"latitude": -5.1342,  
"location": {  
"lon": -39.3346,  
"lat": -5.1342  
},  
"timezone": "America/Fortaleza",  
"region\_code": "CE",  
"country\_code3": "BR",  
"postal\_code": "63800",  
"country\_name": "Brazil",  
"continent\_code": "SA"  
},  
"agent": ""-"",  
"virtualhost": "[exampledomain.com](http://exampledomain.com)",  
"source": "/var/log/httpd/access\_log",  
"request": "/index.php",  
"message": "177.37.134.130 - - [31/Jan/2018:22:09:08 +0000] [exampledomain.com](http://exampledomain.com) "GET /index.php HTTP/1.1" 301 260 "-" "-" Server=aws7 "-" 191 0",  
"apache-access": true,  
"@timestamp": "2018-01-31T22:09:08.000Z",  
"host": "[aws7.hostdomain.net](http://aws7.hostdomain.net)",  
"bytes": 260,  
"referrer": ""-"",  
"clientip": "177.37.134.130",  
"offset": 17617570,  
"tags": [  
"beats\_input\_codec\_plain\_applied"  
],  
"response": "301",  
"server": "aws7",  
"timestamp": "31/Jan/2018:22:09:08 +0000",  
"httpversion": "1.1",  
"user\_agent": {  
"device": "Other",  
"build": "",  
"name": "Other",  
"os": "Other",  
"os\_name": "Other"  
},  
"logline": "177.37.134.130 - - [31/Jan/2018:22:09:08 +0000] [exampledomain.com](http://exampledomain.com) "GET /index.php HTTP/1.1" 301 260 "-" "-" Server=aws7 "-" 191 0",  
"verb": "GET",  
"@version": "1",  
"request\_duration\_ms": 191,  
"request\_duration\_s": 0,  
"beat": {  
"name": "[aws7.hostdomain.net](http://aws7.hostdomain.net)",  
"version": "6.1.2",  
"hostname": "[aws7.hostdomain.net](http://aws7.hostdomain.net)"  
}  
},  
"fields": {  
"@timestamp": [  
"2018-01-31T22:09:08.000Z"  
]  
},  
"highlight": {  
"logline": [  
"177.37.134.130 - - [31/Jan/2018:22:09:08 +0000] @kibana-highlighted-field@exampledomain.com@/kibana-highlighted-field@ "GET /index.php HTTP/1.1" 301 260 "-" "-" Server=aws7 "-" 191 0"  
],  
"message": [  
"177.37.134.130 - - [31/Jan/2018:22:09:08 +0000] @kibana-highlighted-field@exampledomain.com@/kibana-highlighted-field@ "GET /index.php HTTP/1.1" 301 260 "-" "-" Server=aws7 "-" 191 0"  
],  
"virtualhost.keyword": [  
"@kibana-highlighted-field@exampledomain.com@/kibana-highlighted-field@"  
],  
"virtualhost": [  
"@kibana-highlighted-field@exampledomain.com@/kibana-highlighted-field@"  
]  
},  
"sort": [  
1517436548000  
]  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 1, 2018, 7:00am UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/25 "2018-02-01T07:00:24Z")

</div>

This is the structure you need:

```nohighlight
mappings
  name-of-document-type
    properties
      geoip
        properties
          clientip
          ...

```

You currently have:

```nohighlight
name-of-document-type
  geoip
    properties
      clientip

```

---

<div class="post-metadata">

**Author:** ![prophoto](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@prophoto](https://discuss.elastic.co/u/prophoto)\
**Post date:** [February 2, 2018, 12:23am UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/26 "2018-02-02T00:23:10Z")

</div>

Still trying, thanks for sticking with me. This didn't work still getting the same error in Kibana map viz.

PUT \_template/apache-template  
{  
"index\_patterns" : ["apache\*"],  
"doc" : {  
"properties" : {  
"geoip" : {  
"dynamic": true,  
"properties" : {  
"clientip": { "type": "ip" },  
"location" : { "type" : "geo\_point" },  
"latitude" : { "type" : "half\_float" },  
"longitude" : { "type" : "half\_float" }  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![aberrantCode](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@aberrantCode](https://discuss.elastic.co/u/aberrantCode)\
**Post date:** [February 2, 2018, 1:27am UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/27 "2018-02-02T01:27:49Z")

</div>

```
{
"mappings": {
	"doc": {
		"properties": {
			"geoip": {
				"properties": {
					"clientId": { "type": "ip" },
					"location": { type: "geo_point" }
				}
			}
		}
	}
}

```

}

---

<div class="post-metadata">

**Author:** ![prophoto](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@prophoto](https://discuss.elastic.co/u/prophoto)\
**Post date:** [February 3, 2018, 12:28am UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/28 "2018-02-03T00:28:14Z")

</div>

Bingo we have a winner!

PUT \_template/apache-template  
{  
"index\_patterns" : ["apache\*"],  
"mappings": {  
"doc": {  
"properties": {  
"geoip": {  
"properties": {  
"clientId": { "type": "ip" },  
"location": { "type": "geo\_point" }  
}  
}  
}  
}  
}  
}

---

<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:** [March 3, 2018, 12:28am UTC](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788/29 "2018-03-03T00:28:40Z")

</div>

Closed on March 3, 2018, 12:28am UTC

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

[Previous page](https://discuss.elastic.co/t/no-geo-point-fields-logstash-6/111788.md?page=1)
