Splunk Search

Trying to exclude a specific value from an extracted field

srinivas_gowda
Path Finder

Hello all,

 

I am trying to exclude an specific value within a field while retaining others. Can you please let me know.

 

Eg values:

1) /Server/Cpu/load/Login

2) /Server/Memory/usage

3)/Load/usage/value

 

These above are the values extracted form the event and I will have to remove only /Server value from the field while retaining all other values from the event.

Expected values needed:

1) /Cpu/load/Login

2) /Memory/usage

3) /Load/usage/value

 

Please help in getting this.

 

Labels (4)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

where field is the name of the field you want the replacement done

| eval field=replace(field,"\/Server","")
0 Karma

skramp
SplunkTrust
SplunkTrust

You can do it by replace command:

| replace "/Server*" with "*"

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...