Dashboards & Visualizations

How to Rename event in a field

woodlandrelic
Path Finder

Hi 

Am trying to change the "Cloud Service Provider (CSP)"  to "CSP". The field name is "Registration Type"

Screenshot (8).png

Thanks

Labels (1)
0 Karma
1 Solution

woodlandrelic
Path Finder


Thank you so much it worked. This was the result much appreciated.

| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess Only","AO",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess and Authorize","AA",'Registration Type')

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')

woodlandrelic
Path Finder

@ITWhisperer  Thanks but am getting an error msg. It seems am missing something.Screenshot (11).pngScreenshot (9).png

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The if function has only 3 parameters, the comparison, the result if true, and the result if false. You could split what you have over a number of eval commands, comparing the field to the different strings you want to change, or you can replace the if function with a case function.

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions 

woodlandrelic
Path Finder


Thank you so much it worked. This was the result much appreciated.

| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess Only","AO",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess and Authorize","AA",'Registration Type')

0 Karma
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

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 ...