Splunk Search

How do you filter search results based on field-values in a lookup file?

senthamilselvan
Engager

i have unique 19 address field in a address.csv file,such as
address
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_visa_account.dat
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_als_account.dat
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_impact_account.dat
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_fdr_account.dat
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_mortgage_account.dat
/ai/rcmid/abinitio/prod/rcmln/data/mfs/mfs_14way/rcm/rcm_aml_src/main/d_aml_compass_account.dat
.......................

and i want to filter my base search results which have only address entries from CSV file

index=dime sourcetype=auditd [search index=dime sourcetype=auditd key=aud_sar success=yes | table msg] | transaction msg
| table node, address, auid, uid
| rename node as "Server", address as "Name"

0 Karma
1 Solution

DalJeanis
Legend

Something like this would work, assuming the address.csv file has a field called address that has the URLs you want to match.

index=dime sourcetype=auditd [search index=dime sourcetype=auditd key=aud_sar success=yes | table msg] | transaction msg
| table node, address, auid, uid
| lookup address.csv  address OUTPUT address as foundme
| where address = foundme
| rename node as "Server", address as "Name" 

View solution in original post

0 Karma

DalJeanis
Legend

Something like this would work, assuming the address.csv file has a field called address that has the URLs you want to match.

index=dime sourcetype=auditd [search index=dime sourcetype=auditd key=aud_sar success=yes | table msg] | transaction msg
| table node, address, auid, uid
| lookup address.csv  address OUTPUT address as foundme
| where address = foundme
| rename node as "Server", address as "Name" 
0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...