Splunk Search

Splunk Alert search time latest=-5m@m OR latest=now

Flenwy
Explorer

Hello everyone,

I'm currently setting up a lot of alarms in Splunk, and a question has arisen regarding what is better in terms of time.

We've considered two scenarios:

  1. latest=-5m@m
  2. latest=now

If I run the alarm every 5 minutes, I naturally want to avoid having "gaps" in my search. 
I thinks both options will work but iam not 100% sure.

I appreciate any insights on this.

Thank you.

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

It depends on what your earliest is and how quickly your events are indexed, and what timestamps are used on your events.

For example, some systems such as Apache HTTPD often log with a timestamp which represents when the request was received, but it is only written when the response is sent, so an event which takes more than say 5 minutes, may not show up in your search if you are only looking back 5 minutes every 5 minutes.

View solution in original post

Flenwy
Explorer

Hello @ITWhisperer,

thank you a lot for this good explanation.
Now i know where to look at.

Kind regards,
Flenwy

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It depends on what your earliest is and how quickly your events are indexed, and what timestamps are used on your events.

For example, some systems such as Apache HTTPD often log with a timestamp which represents when the request was received, but it is only written when the response is sent, so an event which takes more than say 5 minutes, may not show up in your search if you are only looking back 5 minutes every 5 minutes.

Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...