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!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...