# Logstash 2.1.0 Geoip Filter

**URL:** <https://discuss.elastic.co/t/logstash-2-1-0-geoip-filter/42285>\
**Category:** Logstash\
**Created:** [February 20, 2016, 4:29am UTC](https://discuss.elastic.co/t/logstash-2-1-0-geoip-filter/42285 "2016-02-20T04:29:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omer\_Uludag](https://avatars.discourse-cdn.com/v4/letter/o/b9e5f3/32.png) [@Omer\_Uludag](https://discuss.elastic.co/u/Omer_Uludag)\
**Post date:** [February 20, 2016, 4:29am UTC](https://discuss.elastic.co/t/logstash-2-1-0-geoip-filter/42285/1 "2016-02-20T04:29:36Z")

</div>

Hello together,

I would like to use the GeoIP filter for gettting the locations from the IP addresses. The code is working, but it does not parse the location field because it says: "reason"=\>"field must be either [lat], [lon] or [geohash]"}}}}, :level=\>:warn}  
My conf file looks like this:  
`input { file { path => "/Users/oemer/locations.csv" start_position => "beginning" codec => plain { charset => "ISO-8859-1" } } } filter{ csv { columns => ["Dealer_Code","Location_ID","Answer_ID","IP_Address","OVERALL_SAT","RECOMMENDATION","",""] separator => "," } geoip { source =>"IP_Address" fields =>["longitude","latitude"] target =>"location" } } output { elasticsearch { hosts => "localhost:9200" } stdout{} }`  
The yellow error message looks like this for location:  
`"location"=>{"latitude"=>33.59559999999999, "longitude"=>-117.7003}}, "location"]}`

Do you maybe know where the problem can be?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [February 20, 2016, 4:48am UTC](https://discuss.elastic.co/t/logstash-2-1-0-geoip-filter/42285/2 "2016-02-20T04:48:38Z")

</div>

If you get the error from Kibana, in the `fields`, you need to use "location" instead of "longitude" and "latitude". Below is my working config

```
	geoip {
		source => "IPV4_SRC_ADDR"
		target => "src_geoip"
		fields => ["country_code2", "country_name", "continent_code", "region_name", "real_region_name", "city_name", "postal_code", "timezone", "location"]
	}
```

---

<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:10am UTC](https://discuss.elastic.co/t/logstash-2-1-0-geoip-filter/42285/3 "2017-07-06T05:10:30Z")

</div>


