Splunk Search

How do I use the map search in django?

freeofwind
New Member

{%searchmanager id="test"
search='eventcount summarize=false index=$input_index$ | fields index | map search="|metadata type hosts index=$index$ | eval index=$index$ | search totalCount > 0" | fields index host recentTime'|token_safe%}

simpleXML is $$index$$.
Is Django?

Tags (2)
0 Karma

Aaroncgray
New Member

GeoDjango could handle something like that. Supposing your Home model looks like this:

from django.contrib.gis.db.models import PointField

class Home(Model):
location = PointField()
.. etc

You could fetch all Home models within x miles of a point like this:

from django.contrib.gis.measure import D
from django.contrib.gis.geos import Point

Home.objects.filter(location__distance_lte=(Point([...]), D(mi=x)))

Basically, what you need to give to the filter is a tuple containing a Geometry (Point in your case), and the distance(with the D object. You have a large range of units to represent the distance, in your case mi).

Also, this won't work in MySQL because there is no backend function to handle it. Your best bet is PostgreSQL. For any writing help you can use this essay writing service uk( http://top5essaywriters.com ) for a better support.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...