GeoMap Panel Help

Hi Community, my first time here…

I am looking for some help with the following scenario.

I have a variable ($ip) in a dashboard that will include one or more IPs denoting active login sessions. I plan to use Maxmind’s GeoLite2 API to retrieve the geo-location coordinates (lat, long) and plot it on the geo-map panel using JSON API as a datasource for Maxmind. Maxmind’s Geo-lite2 API only supports a single IP per API request to retrieve the geo-location of the IP. So, if my variable has multiple IPs, I will need to make multiple API calls per IP.

However, it seems like I am running into two challenges:

  1. I can only seem to access the first IP in the variable and using suggestions like ${ip.0}, ${ip.1} did not seem to work.
  2. It seems like I can only make a single API call per Query line in the the GeoMap panel configuration/settings and there isn’t an easy way to script and loop over all IPs in the variable and make the API request to Maxmind.

Please let me know if you need any more information. Thank you for your support in advance!

welcome @howrish
can you share documentation for maxmind? does it take only one value only?

one way could be static data source plugin

Thank you @yosiasz. Yes, the free tier Geolite2 API only allows one IP address per call

Let me look into the static data source and usage of Javascript to do this.

1 Like

also out of the box geomap will not work. you would need to use orchestra city plugin or some other mapping utility via Dynamic Text plugin that allows you to add eternal resources

It seems like as long as I can pass lat, long (and other metrics I want to display on hover popup) to geomap, it seems to work. Am I missing something here? :slight_smile:

1 Like

ah yes never mind :joy:

Also might want to look into caching if allowed

Then next call to same ip address you fetch from cache first @howrish

That makes sense. Thank you @yosiasz

send in $ip, loop, then return data @mikhailvolkov

2 Likes