Getting Data In

Why is WILDCARD in lookup not working?

Toki
Explorer

I am using splunk cloud.
I would like to use the lookup file to find out if there is an IP corresponding to the blacklist, but only 10.50.88.22 is hit.

[definition of lookup]
WILDCARD (IP)

[Contents of lookupfile]
IP
10.50.88.22
10.30.50.70

[Search statement]
|makeresults format=csv data="IP
10.50.88.220
10.50.88.22
10.50.88.2"
|lookup test.csv IP OUTPUT IP as list_IP
|where list_IP IN(IP)
|table IP list_IP

If it works correctly, I want the following two to hit.
10.50.88.220
10.50.88.22

Referencing past questions and changing the lookup definition to the following did not work.
WILDCARD (IP)

Is my search statement wrong?
Any advice would be greatly appreciated.

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Your lookup should contain an asterisk in the data where you want wildcard matching to work, e.g.

10.50.88.22*

but also you are using a lookup on the CSV itself, which does NOT support any wildcard lookup. You must use the definition name to perform the lookup, not the CSV file.

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Your lookup should contain an asterisk in the data where you want wildcard matching to work, e.g.

10.50.88.22*

but also you are using a lookup on the CSV itself, which does NOT support any wildcard lookup. You must use the definition name to perform the lookup, not the CSV file.

0 Karma

Toki
Explorer

Thank you for your answer.
It is solved!

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!

From Raw Data to Executive-Ready Stories, Faster

Build Data Stories for Every Audience  A dashboard is rarely just a dashboard. It might be the view an ...

Guided Onboarding with Auto-schema Is Now Generally Available

  We are excited to announce the General Availability of Guided Onboarding with Auto-Schematization ...

ATTENTION: We’re Moving! (AGAIN!)

The Splunk Community Slack is undergoing a system migration to keep our workspace secure and ...