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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...