Splunk Search

stats count, only show if 2 or more

mcbradford
Contributor

I am using the following, but I only want to see events if the number dest_ip are 2 or more.

|top 10000 src_ip, dest_ip | stats count, values(dest_ip) by src_ip

Ideas?

Tags (1)
0 Karma

lguinn2
Legend

I think you need

|top 10000 src_ip, dest_ip | stats dc(dest_ip) as num_dest_ip, values(dest_ip) by src_ip | where num_dest_ip > 2
0 Karma

bobbyfaber
Explorer

Does this work?

|top 10000 src_ip, dest_ip | stats count, values(dest_ip) by src_ip | where count > 2

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...