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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...