I have a need to share high level metrics (via tstats) from a couple of indexes that a few of my teammates do not have access to. I have a scheduled report, let's call it ScheduledReportA, that is running that tstats command once a day in the morning.
I was planning to use the loadjob command to load the results of that report into a dashboard that my teammates can then filter on and search to get the information they need but I've noticed that the loadjob command only works some of the time for me, and otherwise will return 0 results. I know it is not my search syntax as I have used the same search and sometimes gotten results, sometimes not. Syntax for reference:
| loadjob savedsearch="kaeleyt:my_app_name:ScheduledReportA"
Some additional information to help rule things out:
I don't suspect it to be a permissions issue, or a job expiration issue based on the above but I'm wondering if I'm missing something or if anyone has run into similar issues.
Hi @kaeleyt
I wonder if the following will help work out what is going on? Can you run this to see if this shows the resultCount=0 or any other issues?
You might need to tweak:
| rest splunk_server=local /servicesNS/nobody/my_app_name/saved/searches/ScheduledReportA/history
| table updated, published, eventCount, is* id
| rex field=id "(?<uri>\/services.*)$"
| map maxsearches=10 search="|rest $uri$ "
| table id dispatchState eventCount resultCount ttl is*
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing
The ttl of my latest job for this report is set to expire approx 2 days (~170000+ seconds) from now. I've been using the _audit index to check the resultCount for these jobs and it has never been 0. I've also been checking the ttl via the Activity > Jobs view (2nd image in screenshot, had to take a screenshot of my two screenshots to get past the 1 attachment limitation 🙂 ).
Is it possible that having multiple saved jobs from this search alive at the same time causes an issue? I have two alive currently, one from yesterday morning and one from this morning (similar to what you're showing in the screenshot). If this is a possibility, any recommendations on how I can only have 1 report job alive/kept at any point in time?
Running on SHC and it's transformed results.