Can't seem to get this lookup(KVstore) to function. The dataset is from active directory in some cases in the same event the user field isn't populated with the sam account data but rather with the accounts sid. I'm trying to enrich the data by applying a lookup that has many fields of information regarding each user so that a table has useable information from the event such as the user name. below is the search query:
index=wineventlog source=WinEventLog:Security
[| inputlookup AD_Audit_Change_EventCodes WHERE change_category="Group Membership"
| stats values(EventCode) AS EventCode by obj_type
| format
| table search] src_user_type="user"
| rex field=member_obj_sam "(?<account_sid>\C-\C-\C-\C\C-[0-9]+-[0-9]+-[0-9]+-[0-9]+)"
| lookup AD_Obj_User sAMAccountName as src_user output displayName as "Admin Display Name"
| lookup AD_Obj_User sid_lookup as account_sid output displayName as "Account Display Name"
| lookup AD_Obj_User sAMAccountName as member output displayName as "Member Display Name"
| lookup CORP_Monitored_Security_Groups_def CORP_group_name as Group_Name output CORP_group_name
| search CORP_group_name=*
| table _time, "Admin Display Name", src_user, Group_Name, msad_action, member_obj_sam, "Member Display Name", MSADGroupClass, MSADGroupType, src_nt_domain, host
| rename src_user as "Admin Account",MSADGroupClass as "Type",MSADGroupType as "Scope",src_nt_domain as "Domain",Group_Name as "Group Modified",msad_action as "Action",member_obj_sam as "Member"
| sort -_time
The lookups and rex:
#This works correctly and a new field(account_sid) has the expected data: e.g s-0-0-00-0000000000-0000000000-00000000-000000
| rex field=member_obj_sam "(?<account_sid>\C-\C-\C-\C\C-[0-9]+-[0-9]+-[0-9]+-[0-9]+)"
#this works as expected
| lookup AD_Obj_User sAMAccountName as src_user output displayName as "Admin Display Name"
# this does not work!
| lookup AD_Obj_User sid_lookup as account_sid output displayName as "Account Display Name"
#this works as expected
| lookup AD_Obj_User sAMAccountName as member output displayName as "Member Display Name"
#if i perform the following i get results i expect in a new search window
| inputlookup AD_Obj_User | search sid_lookup="s-0-0-00-0000000000-0000000000-00000000-000000"
I'm not sure if I've met a lookup limit or if there is an obvious error in the query itself, but i can't see anything in offical litreture as to what is going wrong
... View more