Splunk Search

Field transformation

LauraBre
Communicator

hello,

I have this following log in Splunk:

RS:D2T,PAN:1/1,Req:fr18126,User:a169805,TKN:g00e29dfd883effecba,H:W60080,SN:UTKBENCH,RC:000,TIME:180ms

I create a field RC which correspond and now I want to associate to each value of RC a value in splunk. For example I want to say where RC=000 the value is "ok". I know that I can add in my search "eval serieRC=case("RC=000,"ok",...)" but there are a lot of values and if there are a new value later, I have to modify all my search which take account this field to associate a new value. So I want to know if there is an other solution to this problem. I saw that there is "field transformation" but I don't understand very well how associate a value X to a value Y which is in the log for the field "RC".

Thanks by advance to your help.

Laura

Tags (1)
0 Karma
1 Solution

rturk
Builder

The answer to your problem is the use of lookup tables. There is an excellent example/tutorial on their use here: http://docs.splunk.com/Documentation/Splunk/latest/User/Fieldlookupstutorial.

This way you can just add new values to the lookup files later without having to change your saved search.

Hope this helps 🙂

View solution in original post

rturk
Builder

The answer to your problem is the use of lookup tables. There is an excellent example/tutorial on their use here: http://docs.splunk.com/Documentation/Splunk/latest/User/Fieldlookupstutorial.

This way you can just add new values to the lookup files later without having to change your saved search.

Hope this helps 🙂

LauraBre
Communicator

Thx very much for your answer. I look this and try to use that.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...