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

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
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.

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.

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

Get Updates on the Splunk Community!

#### What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

#### Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

#### Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...