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
---
What goes around comes around. If it helps, hit it with Karma 🙂

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
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...