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 | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...