We have a few users scheduling searches using "all time", time frame.
How can I track those knowledge objets and delete / Pause them?
Hi @athorat,
You can see all the scheduled searches that are enabled with an earliest time as "all time" with the below:
| rest /servicesNS/-/-/saved/searches search="is_scheduled=1" search="disabled=0" search="dispatch.earliest_time=0" timeout=0
| table dispatch.earliest_time, title, eai:acl.app, eai:acl.owner, search
However, people can get around this by:
But that should find the immediate culprits for you.
You can also look in the _audit index to find searches being run with all time:
index=_audit action=search info=completed search_et IN(0,"N/A")
| stats count, sum(total_run_time) as total_run_time values(provenance) as provenance by app, user
| fieldformat total_run_time=tostring(total_run_time,"duration")
| sort - total_run_time
There are ways to avoid appearing in this search, but that should give you a good starting point.
Cheers,
Daniel