Splunk Search

Is it possible to enter a range of values into a field of a lookup file?

erwan_raulet
Explorer

I use a lookup file for matching a TCP or UDP port and an application. Is it possible to specify a port range instead of a single port? If so, what is the syntax to do this?
An exemple:

dest_port | application
53 | dns
80 | http
5000-5010| application1

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Lookups are exact string matches so putting a range in the lookup file won't work.

---
If this reply helps you, Karma would be appreciated.
0 Karma

MuS
SplunkTrust
SplunkTrust

By default they are exact matches, but you could use a wildcard lookup like in @Ayn 's answer here http://answers.splunk.com/answers/52580/can-we-use-wild-characters-in-lookup-table.html

So using a csv file like this

dest_port | application
500* | application1

should work for port ranging from 5000-5009

0 Karma

erwan_raulet
Explorer

Thank you for your help. Does this apply to ports above 50000 to 50099?

0 Karma

MuS
SplunkTrust
SplunkTrust

You need to test it; but I assume it does

0 Karma
Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...