Splunk Search

rename data

haziqwebs
New Member

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

0 Karma

somesoni2
Revered Legend

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

woodcock
Esteemed Legend

Like this:

... | replace "CPU001" WITH "CPU1" "CPU_ALL" WITH "CPUALL" IN Jenis

jmallorquin
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
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...