Can you apply the current timerange to an imported savedsearch


I have a saved search that takes hours to run over all time. I would like to be able to do a subsearch of that data on a form. What I currently have is a form with a dropdown host list and TimeRangePicker. The search is :-

| savedsearch "mysearch" | search host=$host$ 

but this keeps the "all time" that the saved search ran over and not the current time range. I'd prefer not to create my own time picker and add in earliest= latest= as it complicates things and throws up a message "your time range was overridden..."

Is there a command I'm missing?

Splunk Employee
Splunk Employee

It seems it would be better not to use a savedsearch in this case but to use summary indexing. Set up a search to add to the summary on a schedule and then run your report on that.

Depending on your search a data model may also help.

Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!