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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...