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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...