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, an upvote 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, an upvote would be appreciated.

View solution in original post

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, an upvote would be appreciated.
0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.