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
Legend

@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
Legend

@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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...