Splunk Search

Replacing Field Value

beepbop
Explorer

Hello, I have some field values which I am unable to replace with the 'replace' command in the csv file. I have Power States of servers which are Powered On and Powered Off and there are some fields which have both powered on and powered off status like:

server namePoweredOn
server namePoweredOff
server name

poweredOn

poweredOff

server namepoweredOn poweredOff suspended
server namepoweredOff PoweredOn poweredOff

 

I was able to change the field value of "poweredOn poweredOff suspended" with
|replace  "*poweredOff poweredOn suspended*" with "*Suspended*"
but when I change the command with
|replace  "*poweredOn poweredOff*" with "*PoweredOn*"
it doenst reflect. Can anyone tell me how to replace these?

Labels (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex mode=sed "s/poweredOn poweredOff suspended/Suspended/g"
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...