Splunk Search

Based on key passed want to fetch value data from csv file

sandeepshelar4
Loves-to-Learn Lots
  • I have one csv file  with empid as key and name as value..sample Data looks like emp id is E101  value is John ..now I want to pass key data as E101 as want to fetch emp name  . ie John.  Please note that I am getting empid value from splunk search itself part of query and based on that empid want to fetch emp name from csv file. ..As emp name is not present in log I have uploaded mapping of emp id and emp name via csv file.. Can any one help me on this.. @gokadroid 
Labels (5)
0 Karma

manjunathmeti
Champion

hi @sandeepshelar4,
Assuming field empid is there in both index and CSV file and name is there in CSV file.

index=index sourcetype=st | lookup filename.csv empid OUTPUT name 

 

0 Karma
Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...