Knowledge Management

How to run search on lookup file with case insensitive

rashi83
Path Finder

hi ,
I have a lookup file with million of records, there are user name with lower or upper case. I need to match the user name irrespective of case. I have added a lookup defn ( with case sensitive check box unticked). I can see in transform.conf that match_case_sensitive=0
But still search is running with case sensitive.

I am using Splunk 8.0. Any suggestions?

Labels (1)
Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

You have to perform your lookup through the lookup definition, not the lookup file so try using lookupsplunk (or whatever the name of your lookup definition is), instead of lookupsplunk.csv, like this:

index="x" AND sourcetype="Y"
| rex "(?:Users%5C)(?(.*))(?:%5C(AppData|Desk))"
| lookup lookupsplunk user AS UserID OUTPUT Office Country UserName

View solution in original post

0 Karma

woodcock
Esteemed Legend

You have to perform your lookup through the lookup definition, not the lookup file so try using lookupsplunk (or whatever the name of your lookup definition is), instead of lookupsplunk.csv, like this:

index="x" AND sourcetype="Y"
| rex "(?:Users%5C)(?(.*))(?:%5C(AppData|Desk))"
| lookup lookupsplunk user AS UserID OUTPUT Office Country UserName
0 Karma

rashi83
Path Finder

Awesome , thank you very much !!

0 Karma

to4kawa
Ultra Champion
index="x" 
| rex field=_raw "(?:Users%5C)(?<UserID>(.*))(?:%5C(AppData|Desk))" 
| inputlookup lookupspluk.csv append=t 
| eval UserID=coalesce(lower(UserId),lower(user))
| eventstats values(Office) as Office ,values(Country) as Country ,values(UserName) as UserName by UserID

at first, check your POST message, some strings is missing.
and let's make a lookup with lowercase or uppercase username.

0 Karma

woodcock
Esteemed Legend

Show us your search SPL.

0 Karma

rashi83
Path Finder

index="x" | rex field=_raw "(?:Users%5C)(?(.*))(?:%5C(AppData|Desk))" | lookup lookupspluk.csv user as UserID OUTPUT Office,Country,UserName

0 Karma

rashi83
Path Finder

@woodcock - any suggestions. M still stuck , even though I have the stanza in transform.conf . I have also tried to put 0 in place of false

[ColleagueLookup]
filename = colleaguecountry_splunk_NewSQL.csv
case_sensitive_match = false

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...