Splunk Search

please help on how to achieve the below kind of lookup/rename for 100+ fields of my events

smiththebest
New Member

My event log has comma separated field values of 100+ fields. Each field can have about 2-15 different values. Example if field10=3, I need to map to earth, field10=4, map to mars so on. If field11=4, map to blue, field11=5, map to red and so on. Please help with an example format of lookup csv and how to use it in the search bar so the searched events in the output show with the mapped values. thank you

mylookup.csv
.
field1,1=mercury,2=venus,3=earth
field2,1=brown,2=blue,3=red,4=yellow,5=green

my basic search gives
3,2,a,b,c..
how to get output like
earth,blue,x,y,z....
or
3_earth,2_blue,p_x,q_y,r_z....

0 Karma

Anantha123
Communicator

Create 2 lookup tables . One for color (color.csv) and other for Planets (Planets.csv)

Planets.csv will have fields -fields1 , planet
color.csv will have fields - field2, color

base query
| lookup Planets.csv fields1
|lookup color.csv fields2
| table fields1,planet,fields2,color.

0 Karma

smiththebest
New Member

Thank you, my issue is there are about 50 + useful fields out of 250 odd total fields, this means my lookup need to be 50 files. I think it is better to do just replace command in search for the value in fields?

0 Karma

jawaharas
Motivator

What's your basic search? Is your lookup table has headers?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...