Alerting

Question regarding timeframes and behaviour of delayed alerts

Bastelhoff
Path Finder

Heyho!

I am currently working on putting together a summary index and would like to do it via an alert.
The basics are all clear on how to set an alert, scheduling, writing into the index and so on.
However I haven’t been able to find any best practice info here and info on how splunk behaves on delayed alerts (not delayed indexing).

So the Alert I am setting up (and this is already working in a csv) is doing a search for 6h which is at least full 24h ago, and it snaps to the last completed 6h batch of the previous day ( 0,6,12,18). So if you run a search on the 26. of May at 6:01 or at 11:55 it will automatically search for the timeframe of 25. May at 0:00 to 6:00. And that’s all fine in itself, no assistance needed.

What I do not know though is how splunk alerts usually behave.
When I schedule a search in Splunk to run at 0:00 and let’s say select the timeframe in the alert of -6h to now. What happens if due to technical issues the search is delayed and runs at 6 AM? Will it now search from 0:00 to 6:00 instead?
When a search is delayed, will the now() command in the search refer back to the “old” scheduled date or will it accordingly use the date of runtime?
What happens if you schedule a hourly search but due to technical issues no search can run in a 90m time window. Will the delayed search run together with the next search or will it be skipped?

With using these 6h intervals I mentioned before in my plans, do you think that all issues are minimized as far as it gets or do you have any other recommendations?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

When I schedule a search in Splunk to run at 0:00 and let’s say select the timeframe in the alert of -6h to now. What happens if due to technical issues the search is delayed and runs at 6 AM? Will it now search from 0:00 to 6:00 instead?

Yes

When a search is delayed, will the now() command in the search refer back to the “old” scheduled date or will it accordingly use the date of runtime?

now is always the time the search runs, not when it was scheduled.

What happens if you schedule a hourly search but due to technical issues no search can run in a 90m time window. Will the delayed search run together with the next search or will it be skipped?

The search will be skipped.

---
If this reply helps you, Karma would be appreciated.
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, ...