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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...