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!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...