Splunk Search

lookup usage in query

sahana
Engager

Hi,

I have a requirement like we have a csv file which has the values of functionid and functiondesc, this file was added in lookup also. I get a value eventid from the logs which is same as functionid. Now,  we need to fetch  the functiondesc of the corresponding eventid. and display it in table.

Labels (1)
0 Karma

sahana
Engager

I was suppose to get functiondesc value using eventid?

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

That's how the lookup command work (you can alias the field name from the event to be the same as the field name from the lookup)

lookup

Description

Use the lookup command to invoke field value lookups.

For information about the types of lookups you can define, see About lookups in the Knowledge Manager Manual.

Syntax

The required syntax is in bold.

lookup [local=<bool>] [update=<bool>] <lookup-table-name> ( <lookup-field> [AS <event-field>] )... [ OUTPUT | OUTPUTNEW (<lookup-destfield> [AS <event-destfield>] )... ] https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Lookup

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| lookup csv_store functionid as eventid
0 Karma
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...