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!

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 ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...