# Finding a public IP for geotagging

**URL:** https://discuss.elastic.co/t/finding-a-public-ip-for-geotagging/237979
**Category:** Beats
**Created:** [June 21, 2020, 10:38pm UTC](https://discuss.elastic.co/t/finding-a-public-ip-for-geotagging/237979 "2020-06-21T22:38:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DPattee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpattee/32/37772_2.png) [@DPattee](https://discuss.elastic.co/u/DPattee)
#### Post date: [June 21, 2020, 10:38pm UTC](https://discuss.elastic.co/t/finding-a-public-ip-for-geotagging/237979/1 "2020-06-21T22:38:59Z")

</div>

The scenario is enhancing my metricbeat data to help track a dozen laptops. I thought adding geo data to their low frequency uptime response would be a cheap way to do this. A custom pipeline that all metricbeats data goes through and then branches off if _ctx.metricset.name=='uptime'_ was how I'd keep the lookups to a minimum.

Hit a couple snags though...

The _add\_host\_metadata_ processor with _netinfo.enabled: true_ will add a machine's local IP information.

1. host.ip is an array of all the v4 and v6 addresses a machine reports. The geoip processor can't work on an array of course.

2. host.ip doesn't contain a public IP for machines behind firewalls/balancers/etc anyway

So my question is mainly:

1. How do I easily add a public IP field that I can use to geolocate devices.

---

<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 20, 2020, 12:39am UTC](https://discuss.elastic.co/t/finding-a-public-ip-for-geotagging/237979/2 "2020-07-20T00:39:14Z")

</div>

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