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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...