Reporting

saved searches

raomu
Explorer

I have schedule report"AAA" which runs once in a month ( pulls huge number of records for last 6 months)

I have another dashboard where I have one panel showing "AAA" data.

my code is :

      <query>| loadjob savedsearch="username:search:Domain_Controllers_Status_In_Splunk"</query>

    </search>

    It use work fine till last month, and now I don't see any data pull in Dashboard panel. Although the schedule reports works fine. 

Any idea how long the saved searches are accessible is there ant time frame like a week or some time is set, I am assuming if the saved is not getting expired.

Any suggestion.

0 Karma
1 Solution

cmerriman
Super Champion

run this and look at the dateExpire field that is calculated. that should give you an idea.

|rest /services/search/jobs|search  isSavedSearch=1 delegate="scheduler" label="Domain Controllers Status In Splunk"|fields author label earliestTime latestTime runDuration isDone isFailed isSaved sid ttl published|eval publishedepoch=strptime(published,"%Y-%m-%dT%H:%M:%S.%3N%:z")|eval dateExpire=strftime(publishedepoch+ttl,"%Y-%m-%dT%H:%M:%S")

the ttl is the time to live. you can change the settings in savedsearches.conf under dispatch.ttl
https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Savedsearchesconf#dispatch_search_options

View solution in original post

0 Karma

cmerriman
Super Champion

run this and look at the dateExpire field that is calculated. that should give you an idea.

|rest /services/search/jobs|search  isSavedSearch=1 delegate="scheduler" label="Domain Controllers Status In Splunk"|fields author label earliestTime latestTime runDuration isDone isFailed isSaved sid ttl published|eval publishedepoch=strptime(published,"%Y-%m-%dT%H:%M:%S.%3N%:z")|eval dateExpire=strftime(publishedepoch+ttl,"%Y-%m-%dT%H:%M:%S")

the ttl is the time to live. you can change the settings in savedsearches.conf under dispatch.ttl
https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Savedsearchesconf#dispatch_search_options

0 Karma

raomu
Explorer

Thanks, I am able to find the expire date/Time.

0 Karma

mayurr98
Super Champion

hey

you can definitely extend the job life time as mentioned in this doc
https://docs.splunk.com/Documentation/Splunk/6.6.3/Search/Extendjoblifetimes

but what i would suggest is try this search command savedsearch and use this is dashboard instead of loadjob
https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Savedsearch
| savedsearch your_report_name
let me know if this helps you!

0 Karma

cmerriman
Super Champion

I'll agree that you could run the savedsearch command, however, it will run the entire saved search when the dashboard is ran, instead of pulling in the results from the report. as stated above, it is a huge amount of data, and could take a while. I'd recommend extending the life of the job under the savedsearches.conf for ongoing runs of this report.

0 Karma

mayurr98
Super Champion

here i am assuming that saved search is accelerated 😛

0 Karma

andrey2007
Contributor
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...