Splunk Search

wildcard matching in lookup input

RSS_STT
Explorer

Can i do the wildcard matching in lookup?

|makeresults
|eval ip=192.168.101.10

|lookup ip.csv ip output host

In my lookup i have two entry ip=192.168.101.10 & ip=192.168.101.10/24.

How can i add wildcard (*) for match and i should get two entry.

 

Labels (1)
Tags (1)
0 Karma

jawahir007
Communicator

.

0 Karma

RSS_STT
Explorer

what if i want to match host_name= abc & host_name=abc_123 which is in lookup file.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The wildcard need to be defined in the lookup e.g. abc* will match abc and abc_123

0 Karma

RSS_STT
Explorer

could you please help with SPL syntax to match wild card entry.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If you have wildcards in your lookup, just use the lookup command

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @RSS_STT ,

in the same option of the same section try with WILDCARD instead CIDR.

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @RSS_STT ,

in [Settings > Lookups > Lookup Definitions ] open "Advanced Options" and configure CIDR as match_type, as described at https://docs.splunk.com/Documentation/Splunk/9.4.0/Knowledge/Addfieldmatchingrulestoyourlookupconfig...

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...