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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...