Splunk Search

Translate and overwrite the values of a field

akr
Loves-to-Learn Lots

I am new to Splunk. I am trying to overwrite the values of a field (eventLevel) that is in Japanese. I created a lookup table to convert these values to English so that the data is more readable. Now, how can I see those translated values in the eventLevel field?

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could do something like this (this assumes you have at least two fields in your lookup, one called eventlevel (to match your event field) and the other call english_eventlevel)

| lookup translator.csv eventlevel OUTPUT english_eventlevel
| eval eventlevel = coalesce(english_eventlevel, eventlevel)

The coalesce ensures that if there isn't a translation, you keep the original eventlevel

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...