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.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...