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!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...