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
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...