Splunk Search

How do I run a programmatic search against a Search Head Cluster?

Lowell
Super Champion

Is there anything special about interacting with a Search Head Cluster via the REST APIs? Specifically, what endpoint should you hit? Can splunkd (port 8089) be placed behind a load balancer of some kind? SplunkWeb provides some failover and transparent result proxying to minimize user impact, but it's unclear to me how much of that happens within splunkd and how much of the magic is in SplunkWeb.

I assume the easiest approach is just to point the Python SDK to a single SHC member and hope for the best, but I'm guessing there's a better way to do it.

Thoughts? Anyone done this?

0 Karma

jkat54
SplunkTrust
SplunkTrust

Search head clusters will insure the search completes regardless of if you use web or api. In fact every command line and every web button has a corresponding api call.
So you can literally dispatch a search via api on 8089 and check back when it's done and get the results. It won't matter which search head API you hit. So yeah I'd put it behind a load balancer and then maybe use a low length of time for persistence or maybe persist based on source ip.

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...