Splunk Search

Lookup more than one column in Lookup Table

sarahaydenvi
New Member

I want to return descriptions I have in a lookup table. The description corresponds to a code in my Events list. However the code is a single digit number between 0 and 9 and the code column in my lookup table has multiple 0's 1's 2's etc. My lookup table has another column 'TYPE' to parse out these codes.

Is it possible to modify the |lookup command to use the code column when the TYPE column has a specified value and return the corresponding DESCRIPTION?

alt text

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi sarahaydenvi,
you can filter lookup results inserting a variable and use as key field two fields, something like this:

index=my_index
| eval TYPE="UPDATE STATE"
| lookup my_lookup.csv CODE TYPE OUTPUT DESCRIPTION
| ...

Bye.
Giuseppe

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