Splunk Enterprise Security

using lookup values as input to variable

vishaltv
Path Finder

Splunk search query :

index="something" | search hostname=variable

  • using lookup file, map the variable value

Please help.

Thanks in advance

0 Karma

woodcock
Esteemed Legend

With a subsearch, like this:

index="something" AND [|inputlookup YourLookupNameHere.csv | table hostname | format]

aberkow
Builder

Are you asking for how to reference a csv based on a variable value? There is a lookup command https://docs.splunk.com/Documentation/Splunk/7.3.2/SearchReference/Lookup#Basic_example that you can use - in this case the syntax would look something like:

base search...
| lookup csvName.csv variable OUTPUT fieldsToOutput

In this case variable is the joining field between the csv and the base search, and you can OUTPUT whatever fields you want from that row (comma separated list).

Does this answer your question?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...