Splunk Search

Adding a field via lookup at index time

oleg106
Explorer

Hello,

I've been trying to figure out the most efficient way to do this and a bit unclear on ingest-time vs automatic lookups or another way of this this.  This is a simple and probably a common use case:

Events are coming in with event_id code which is not friendly user.  I want to do a lookup at index time against the event_id code (integer) and add a field called event_id_desc with what that code resolves to in a lookup (e.g. event_id: 5, event_id_desc: user login).  What is the most efficient way of doing this?  There are 1500 static codes in the csv.

Thanks!  

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Why do the lookup at index time?  That will add to your storage costs and can slow down ingestion.

Have you considered an automatic lookup?  It will map event_id to event_id_desc at search time without the user/dashboard taking any explicit action.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why do the lookup at index time?  That will add to your storage costs and can slow down ingestion.

Have you considered an automatic lookup?  It will map event_id to event_id_desc at search time without the user/dashboard taking any explicit action.

---
If this reply helps you, Karma would be appreciated.
0 Karma

oleg106
Explorer

This is a relatively low velocity search, so I am not concerned about licensing here.  Would like to bake this into the log for better ES compatibility.  Would auto lookup be an issue in a distributed environment with ES?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

ES does automatic lookups already so I would expect no issues.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...