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!

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 ...