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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...