Splunk Search

How do you make a count based on multiple fields?

rotundwizard
Explorer
index=syslog | eval length=len(field1) | where length > 100 | table field1,field2

I want to create a search that, in addition to matching the length requirement of field1, also only displays results where a count of the occurrences of field2 is above 5.

Tags (2)
0 Karma
1 Solution

renjith_nair
SplunkTrust
SplunkTrust

@rotundwizard ,
Try

 index=syslog | eval length=len(field1)|eventstats count as field2count by field2|where length > 100 AND field2count > 5
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@rotundwizard ,
Try

 index=syslog | eval length=len(field1)|eventstats count as field2count by field2|where length > 100 AND field2count > 5
Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...