All Apps and Add-ons

How to use wildcard in lookup-based searches and alerts?

the_wolverine
Champion

I have a lookup table that contains Domains and URLs:

www.google.com/index.htm
www.blacklist.org/
www.facebook.com

Is there someway to craft a search that will allow a wildcard on both ends? For example, if there is a string of "www.blacklist.org" in my data, it will not match "www.blacklist.org/" in the lookup table (and vice versa.)

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You can specify

 match_type = WILDCARD(domain) WILDCARD(URL)

In the transforms.conf definition of your table. This works starting in version 4.2.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

right, you must include * in your data to indicate the location of a wildcard. You can include one or more in any place in the string, e.g., *.google.com/* is valid.

the_wolverine
Champion

The wildcard will not work without editing the lookup table to include *. For example:

www.google.com\*
www.blacklist.org\*

*Note that this is not documented.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

You can specify

 match_type = WILDCARD(domain) WILDCARD(URL)

In the transforms.conf definition of your table. This works starting in version 4.2.

the_wolverine
Champion

Is there documentation on this method? I'm curious as to how granular the wildcarding is. In the case where my data contains domain=google.com, how is it determined how far in to match?

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...