Splunk Search

Can we automatically delete searches?

ddrillic
Ultra Champion

A Splunk user told us that after every search they run, they go and delete it, and by doing that, they avoid the quota problems. Not the nicest procedure but it seems to be practical. Is there a way to do it automatically for users who choose to?

Tags (2)
0 Karma

tiagofbmm
Influencer

The timetolive TTL of a job can vary with many things, such as if it is a ad-hoc search, a scheduled search (varies with the frequency it runs), or the alert actions that may come out of the scheduled report, or even if the user is actively viewing a dashboard, or even if it shares the job or saves it!

So as you can see there are many reasons for a job not to be deleted. If you really want to do such thing, you need to point at the endpoint:

curl -k -u admin:pass --request DELETE https://localhost:8089/services/search/jobs/scheduler__nobody_c3BsdW5rX2FyY2hpdmVy__RMD5473cbac83d6c...

0 Karma

tiagofbmm
Influencer

@ddrillic please accept an answer if it solved/helped it and upvote it. Otherwise let us know how can we help further

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

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 ...