Splunk Search

How to use a list of values from a table into foreach fieldstr?

danielearangiom
Explorer

Hi,
I already used the following lines with success:

| foreach fieldstr=device "device_name1" "device_name2" "device_name3" "device_nameN" 
    [ eval device= "<<FIELD>>"]

But, is it possible to pass a list of my devices name from a lookup table? I mean, something like:

| foreach fieldstr=device inputlookup devices_list.csv
    [ eval device= "<<FIELD>>"]

With devices_list.csv as:

device
...
device_name1
device_name2
device_name3
device_nameN

Tags (2)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hi @danielearangiomazza,
I don't understand your question properly, if you can give query before foreach or sample input-output so I can help you.

0 Karma
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...