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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...