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
Revered Legend

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
Revered Legend

Do it like this

sourcetype="source_traffic" 
| stats values(dest_port) as Ports by dst_ip
| where mvcount(Ports)>1
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...