Splunk Search

How does a Schedule Saved Search work?

sranga
Path Finder

Hi

I have a question about the workings of the scheduled saved search. Suppose I have a slow-running search that has been scheduled to run every day. The time-range for this search is All-Time. Does the search run over the "all-time" period for every consecutive run after a successful previous run? Or is it smart enough to run only for the delta of the elapsed time between the last successful run and the present time?

Thanks for your input.

Ranga

0 Karma
1 Solution

mctester
Communicator

No, scheduled searches are not that smart. It will run over 'All Time' every time it runs, that is the time-range that you have originally configured.

I realise that this is only an example, but in general, 'all time' searches are very resource intensive and scheduled searches should be optimized as much as possible. If you want to run a search every 24 hours, then you only need to search the last 24 hours - starthoursago=24 - similarly, if you're running an hourly search, you'll want to specify something like starthoursago=1

View solution in original post

mctester
Communicator

No, scheduled searches are not that smart. It will run over 'All Time' every time it runs, that is the time-range that you have originally configured.

I realise that this is only an example, but in general, 'all time' searches are very resource intensive and scheduled searches should be optimized as much as possible. If you want to run a search every 24 hours, then you only need to search the last 24 hours - starthoursago=24 - similarly, if you're running an hourly search, you'll want to specify something like starthoursago=1

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...