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
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...