All Apps and Add-ons

Google Maps: Is there a feature to plot all users that fall within a circle on the map?

anthony_copus
Explorer

Hi,

I currently need to develop a report which plots all users within a custom circle on Splunk maps.
The user will put in a custom lat, lon and radius to create the circle. How can I make this a limitation on the map? Is there a feature for this or do I need to make a mathematical calculation?

The example query I want to alter is:
index=main lat/lon_within_circle=($lat_term$ $lon_term$ $radius_term$) earliest=-30m | geonormalize | eval _geo_count=coalesce(_geo_count,1) | stats sum(_geo_count) as _geo_count by _geo

How can I make this work?

Anthony

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You'll need a bit of Maths or rather Geometry, but you can keep a lot of that in the background with the haversine app at https://apps.splunk.com/app/936/

Basically "fall within a circle" is the same as "has at most a certain distance from the centre", which is where the haversine command comes in. You use it to calculate the great-circle distance between the event's location and your centre point, then filter on that against the radius.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You'll need a bit of Maths or rather Geometry, but you can keep a lot of that in the background with the haversine app at https://apps.splunk.com/app/936/

Basically "fall within a circle" is the same as "has at most a certain distance from the centre", which is where the haversine command comes in. You use it to calculate the great-circle distance between the event's location and your centre point, then filter on that against the radius.

Imjusttesting
Explorer

Hi Martin,

I'm looking for something similar, whereby i've a device that keep sending Lat/Lon data every 30s. And I've user to input Lat/Lon and radius and marked as their respective Geofencing.

Based on what you suggested, how can i write a search that will identify and trigger a alert whenever the device enter the specific zone.

I'm aware there is a new app "Shapester" but i don't really know how to use that app or write a search to identify whenever a device enter the specific zone.
https://splunkbase.splunk.com/app/2893/#/documentation

Appreciate your input on this

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...