Splunk Dev

Custom Search Command (V2/Chunked): Persist script

spunk_enthusias
Path Finder

Hi! Long time listener, first time caller here.

Our custom search command needs some slow initialization, which we would prefer to skip on repeated calls.

Is there a way to keep the process alive after the first invocation and only call dispatch() afterwards?
Something that does what scripttype = persist does for REST endpoints.

My understanding is that the protocol would allow this.

Calling dispatch() in a loop sadly doesn't work - would've been too easy, huh?
(It does work in so far that the command finishes - it's just that the script gets started again the next time)

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...