Splunk Search

Compare main search field contain value of another field value stored in lookup table

rameshpillai
New Member

I would like to compare(not exact match) urls in my proxy log with url stored in lookup table

Eg for URL in proxy log

P1:  99.99.99.99/safebrowse/jh/oiruitupwerouitufkgjlhsfghjdfsglhjpoier/AFHJDFHADS?S=32

----------------------------------------------------------------------------

Eg for URL's in loookup file

L1:  99.99.99.99/safebrowse/jh/oiruitupwerouitufkgjlhsfghjdfsglhjpoier

L2:  88.99.77.66/query.js

L3:  www.notaurl.com/8484/ucd/94843984.php 

Tried to use inputlookup in subsearch and join , however it fails to match , as in either case (subsearch or join) splunk does an exact match

sample subsearch query

|tstats count from datamodel=Web where Web.user!="-" by Web.user Web.url _time
| search [|inputlookup url_lookup | search type="URL" | fields ref_url | rename ref_url as Web.Url]
|table Web.user Web.url _time count

i want help where in P1 should match L1

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The first step is to create lookup definitions which have WILDCARD(URL) set.  Then append a "*" to the URLs.  That should resolve the matching problem.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...