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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...