Splunk Search

how to exclucde number of values from search

Meharkant123
New Member

sourcetype="source_traffic" | stats values(dest_port) by dst_ip

Hi I am lookin for result of IP which have more than one port associate with it.
I would like to exclude the results one IP with one port.
e.g. current result

dest_ip dest_port
10.10.10.01 389
10.10.10.2 162
10.10.10.3 389
............ 143
............ 162
10.10.10.4 389
........... 162
........... 443.

I want result which shows only IP with more than 2 dest_port

dest_ip dest_port
10.10.10.3 389
............ 143
............ 162
10.10.10.4 389
........... 162
........... 443

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Do it like this

sourcetype="source_traffic" 
| stats values(dest_port) as Ports by dst_ip
| where mvcount(Ports)>1

View solution in original post

0 Karma

Meharkant123
New Member

Yes it is working ..much appreciated. thank you!!!

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Do it like this

sourcetype="source_traffic" 
| stats values(dest_port) as Ports by dst_ip
| where mvcount(Ports)>1
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...