Splunk Search

Why does my lookup search fetch results when searching one index but not with another?

Explorer

Hi All,
I have lookup file name called " Privilege_User_List.csv". Using Splunk index, I can able lookup the data and get results. The same query is not working with a different index.
Example:

index=Index1 sourcetype=iis [| inputlookup Privilege_User_List.csv | fields cs_username ] cs_uri_stem="*.aspx"| stats values(cs_uri_stem) as cs_uri_stem by cs_username| rename cs_username as "User Name", cs_uri_stem as "URL" --- it's working

index=Index2 sourcetype=iis [| inputlookup Privilege_User_List.csv | fields cs_username ] cs_uri_stem="*.aspx"| stats values(cs_uri_stem) as cs_uri_stem by cs_username| rename cs_username as "User Name", cs_uri_stem as "URL" --- it's not working.

I checked the index2, whether data is exist or not. some data is exist. I have removed entries one by one and tried. No luck. we have restarted the Splunk service as well.

Can you please help me on this kind of weird issue?

Thanks,
Guru

0 Karma
1 Solution

Legend

Hi guruwells,
verify if the cs_username field is present in the second index and how it'r written (upper/lower case).
after verify your search index=Index2 sourcetype=iis [| inputlookup Privilege_User_List.csv | fields cs_username ] if there are results.
Bye.
Giuseppe

View solution in original post

0 Karma

Explorer

Added format, it's not worked. When I execute
"|inputlookup Privilege_User_List.csv | fields cs_username" query, I can able to see csv list.

Thanks,
Guru

0 Karma

Legend

Hi guruwells,
verify if the cs_username field is present in the second index and how it'r written (upper/lower case).
after verify your search index=Index2 sourcetype=iis [| inputlookup Privilege_User_List.csv | fields cs_username ] if there are results.
Bye.
Giuseppe

View solution in original post

0 Karma

Explorer

Hi,
I thoroughly checked the each and every line of the CSV and results. There is one mismatch with new Index. I have modified the Lookup file accordingly. Now I got the result as expected.

Thanks for the suggestions.

Thanks,
Guru Prasad

0 Karma

Explorer

Even second index also same name and same case. this data is coming from iis logs. I didn't find any difference.

0 Karma

Explorer

Even second index also same name and same case. this data is coming from iis logs. I didn't find any difference.

0 Karma

Super Champion

index=Index2 sourcetype=iis cs_uri_stem="*.aspx" has cs_usernames that match | inputlookup Privilege_User_List.csv | fields cs_username ?

I don't think this will fix the issue, but one thing I like to add to my subsearches is |format as it will show 'cs_username=x OR cs_username=y....'

 [| inputlookup Privilege_User_List.csv | fields cs_username|format ]
0 Karma

Motivator

Can you please check once the permission scope of the csv and whether this csv is accessible in the same socpe as the index to see if changing that helps.

0 Karma

Explorer

Hi,
I have checked the permission of the particular lookup file. For all apps "everyone" can read this file. The same was applied index one as well. there it's showing results.
Thanks
Guru

0 Karma