Splunk Search

How to search for values greater than 10 in the results?

chinmay25
Path Finder

I am working on the query that generates a table with count of security violations. I want to filter our the users with violations greater than 10. 

 

| rex field=_raw "(?<Message>Security\sviolation)\s\S+\s\S+\s(?<User>[A-Z0-9]+)"
| eval Time = strftime(_time, "%m-%d-%Y %H:%M:%S")
| rename JOBNAME as Jobname Time as Date
| eval Workload = substr(Jobname,1,3)
| stats count(Message) as "Security Violations" by Jobname User

 

Resulting table

UserSecurity Violations
ABC1
DEF4
GHI12
JKL3
XYZ`20

 

Thank you,

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| where 'Security Violations' > 10

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| where 'Security Violations' > 10

isoutamo
SplunkTrust
SplunkTrust
In most cases use ” as values and ‘ as field names. Sometimes you need both on same time (see e.g. foreach + eval/fieldformat).
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...