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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...