Splunk Search

How to alert when a field value has > 500 events?

mninansplunk
Path Finder

Hello,

I'm not sure how to achieve this.  I need to create an alert for when a field (user) value has > 500 events for when another field (eventType) is filtered on a specific value.

i.e.  

User: John

EventType: Blocked

I can't figure it out.  Here's what I have so far:

 

|stats count by user, eventType
|eventstats sum(count) as count by eventType
|stats values(eventType) as Blocked, values(user) as user
|table user, Blocked
|where count>500

 

Thanks for any help on this,

Tom

 

 

Labels (1)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

Would this do

|stats count by user, eventType
| where eventType == "Blocked" AND count > 500

(Note your code sample says eventType while the text description says EventType.)

View solution in original post

yuanliu
SplunkTrust
SplunkTrust

Would this do

|stats count by user, eventType
| where eventType == "Blocked" AND count > 500

(Note your code sample says eventType while the text description says EventType.)

mninansplunk
Path Finder

Perfect, that did the trick, thank you for the help.

0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...