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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...