# How to get geo data from IP addresses within Elastic

**URL:** <https://discuss.elastic.co/t/how-to-get-geo-data-from-ip-addresses-within-elastic/186330>\
**Category:** Elasticsearch\
**Created:** [June 18, 2019, 6:06pm UTC](https://discuss.elastic.co/t/how-to-get-geo-data-from-ip-addresses-within-elastic/186330 "2019-06-18T18:06:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Stevenson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_stevenson/32/48477_2.png) [@Vincent\_Stevenson](https://discuss.elastic.co/u/Vincent_Stevenson)\
**Post date:** [June 18, 2019, 6:06pm UTC](https://discuss.elastic.co/t/how-to-get-geo-data-from-ip-addresses-within-elastic/186330/1 "2019-06-18T18:06:27Z")

</div>

We have log documents that contain IP addresses and this data is already saved in an Elastic index. Can we make use of a custom analyzer to take the IP Address and let us get the geographical data from the IP addresses?

I know there's a geoip filter in Logstash, but our data is already in Elastic. How do we create the lat and lng points from our pre-existing ip addresses?

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2019, 7:42pm UTC](https://discuss.elastic.co/t/how-to-get-geo-data-from-ip-addresses-within-elastic/186330/2 "2019-06-18T19:42:50Z")

</div>

You can define an ingest pipeline with a geoip processor and call this pipeline from the reindex API.

As you need to reindex.

---

<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 16, 2019, 7:42pm UTC](https://discuss.elastic.co/t/how-to-get-geo-data-from-ip-addresses-within-elastic/186330/3 "2019-07-16T19:42:51Z")

</div>

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