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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...