Reporting

How to Set Expiry Time for Saved Scheduled Search Results to 7 days

Polarbear
Engager

I have a scheduled job that runs every month, storing monthly report and sending an email with the search results.

This setup works well, but I've encountered a problem: the search results expire after 24 hours.

it will show me the search has probably expired or deleted.

How can i set to 7 days  to prevent expired?

Labels (1)
0 Karma

deepakc
Builder

If you click - go into to the saved search, there is a setting called 'Job Settings',  in there is another setting called 'lifetime', this has a setting of 10 minutes or 7 days, perhaps this will help you.  

Polarbear
Engager

Thank you for your reply!

Is the "lifetime" setting permanent, or does it need to be configured every time? If it's not permanent, is there any way to set it permanently for saved searches

Tags (1)
0 Karma

deepakc
Builder

It looks like you can (not someting I've done as I normally use the default, so worth try it)

From what I gather you can edit for savedsearch.conf file and under your named saved search stanza and add the dispatch.ttl setting

Example

/opt/splunk/etc/my_app/local/savedsaearch.conf

[my_saved_search]
dispatch.ttl = 604800

Have a look at this link

https://docs.splunk.com/Documentation/Splunk/9.2.1/Search/Extendjoblifetimes

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...