Dashboards & Visualizations

How to finalize/delete the jobs (searches) programmatically?

asingla
Communicator

I have an app with 5-6 pages. Each page consist of 5-6 real time searches. Each page allowed to navigate to another pages in this app. Now if user opens a page, navigates to another page and then come back to the same page, it results in 15 real time search running for that user and though effectively it's only 5 jobs user is interested in. I want to kill these searches spawned via a page when user moves away from that page.

I know it's going to be tricky but I will appreciate if someone can suggest a way to solve this problem.

Thanks,

0 Karma

watsm10
Communicator

Hi, I've just come across this problem and overcame it by putting this at the top of my dashboard view (surrounded by XML tags):


< view autoCancelInterval="5" template="dashboard.html" >

The auto-cancel interval is set to 5 seconds. This means that when the search becomes inactive for 5 seconds or more, it will automatically cancel the search from running. You may have to adjust this to suit your own purpose.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...