Splunk Search
Highlighted

rename data

New Member

I want to rename CPU001 to CPU1, CPU_ALL to CPUALL, is it possible?alt text

0 Karma
Highlighted

Re: rename data

Builder

Hi,

Yes, just put this at the end:

| eval Jenis = case (Jenis="CPU001","CPU1",Jenis="CPU_ALL","CPUALL")

Hope i help you

0 Karma
Highlighted

Re: rename data

Esteemed Legend

Like this:

... | replace "CPU001" WITH "CPU1" "CPU_ALL" WITH "CPUALL" IN Jenis
0 Karma
Highlighted

Re: rename data

SplunkTrust
SplunkTrust

If you're looking to rename/update field values with CPU* format (not only CPU001 but CPU002 as well, give this try

Your current search | eval Jenis=replace(Jenis,"(00|_)","")
0 Karma