# How to target City Name as GEOIP Location?

**URL:** <https://discuss.elastic.co/t/how-to-target-city-name-as-geoip-location/287752>\
**Category:** Logstash\
**Created:** [October 27, 2021, 6:04am UTC](https://discuss.elastic.co/t/how-to-target-city-name-as-geoip-location/287752 "2021-10-27T06:04:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![padamrai](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@padamrai](https://discuss.elastic.co/u/padamrai)\
**Post date:** [October 27, 2021, 6:04am UTC](https://discuss.elastic.co/t/how-to-target-city-name-as-geoip-location/287752/1 "2021-10-27T06:04:17Z")

</div>

I have a city name field and I want to visualize it on the map. I am wondering How I can achieve this because the GEOIP filter takes IP but I don't have an IP address.

```auto
geoip{
     source => "[NotifyEventAdvanceRequestModel][Card][City]"
     target = > "city_location"
}

```

I want to see the Transaction Amount against the city on the Map. But by default logstash takes it as string, not location.

---

<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:** [October 27, 2021, 4:09pm UTC](https://discuss.elastic.co/t/how-to-target-city-name-as-geoip-location/287752/2 "2021-10-27T16:09:51Z")

</div>

There is nothing built into logstash to do that. You could use an http filter to send a request using the [Nominatum](https://nominatim.org/release-docs/develop/api/Overview/) /search API, although that feels like overkill. If you can find a list of city names and coordinates you could do it locally using a translate filter.

---

<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:** [November 24, 2021, 4:10pm UTC](https://discuss.elastic.co/t/how-to-target-city-name-as-geoip-location/287752/3 "2021-11-24T16:10:45Z")

</div>

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