Splunk Search

searching for multiple destination ports

allenhau
Engager

I have a search query for:

dest_port=4402

 

I want to include 4404.  what would the syntax for dest_port look like?

Labels (1)
0 Karma
1 Solution

anilchaithu
Builder

@allenhau 

Use either one of the below in your base search

OR command

dest_port=4402 OR dest_port=4404

IN command

dest_port IN (""4402 4404"")

 

View solution in original post

0 Karma

eddy_liang
Path Finder

Works. But how do you clean it up where it returns just a single line to show both ports. It's currently showing multiple lines for each different port.

0 Karma

anilchaithu
Builder

@allenhau 

Use either one of the below in your base search

OR command

dest_port=4402 OR dest_port=4404

IN command

dest_port IN (""4402 4404"")

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...