Splunk Search

Querying partial match from lookup

pjtbasu
Explorer

Hi,

 

I've a lookup that looks like this - 

clientid url 

abc accounts/*/balance

abc accounts/*/name

xyz /user/*/details

 

And I've log like - 

app endpoint responsecode

ms1 accounts/12345/balance 200

ms2 prod/accounts/98765/name 500

.

.

ms1 /user/randomuserid/details 403

 

I want to search with the uri field from lookup, which contains regex and additionally doesn't exactly match with the endpoint field of log (it's like this - *uri*==endpoint). 

 

I am trying to get result like this - 

app url clientid 

ms1 accounts/*/balance abc 

ms1 /user/*/details xyz

ms2 accounts/*/name abc

 

Is it doable via inputlookup? I've around 2500 rows in my lookup file.

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Do your endpoints always end word/number/word? If so, you could extract the two words and combine them to make a string word/*/word and use that to lookup the clientid

0 Karma

pjtbasu
Explorer

No they don't. Those are absolutely randomized 2000+ end points. I've previously tried to create regex value but then I've to tackle case by case, which won't be possible for 2000+ possible endpoints. So I had to abandon that.

That is the reason I created a lookup from a different source. Now in all cases *uri* == endpoint, but still not sure how to achieve that. I was trying match_type in lookup definition. But could not make it to work 

0 Karma
Get Updates on the Splunk Community!

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...