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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...