Splunk Enterprise Security

Correlation search looking for at least x events within y seconds

Sven
Engager

Thanks in advance for your time and assistance. 

I have a Splunk Enterprise Security correlation search intended to trigger when there are at least 20 events having the same values of FieldA and FieldB within 60 seconds. 

Consistent with multiple resources within Splunk docs, I am using the below search.  The correlation search runs once every 30 minutes. 

(Main search) 
| bin _time span=60s 
| stats count by FieldA FieldB 
| where count > 19

This should be straightforward, but the search has fired when there are 20 or more log entries with the same FieldA and FieldB values during the entire 30 minutes since the last correlation search, but definitely not 20 instances within the defined bin window of 60s.

Is there some caveat of using the bin command that I am unaware of?  Is there a more reliable method to achieve the same objective?

_Thanks_

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Tell stats to group results by time as well as the other fields.

(Main search) 
| bin _time span=60s 
| stats count by _time FieldA FieldB 
| where count > 19

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Tell stats to group results by time as well as the other fields.

(Main search) 
| bin _time span=60s 
| stats count by _time FieldA FieldB 
| where count > 19

 

---
If this reply helps you, Karma would be appreciated.

Sven
Engager

Of course. Thank you.

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


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
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, ...