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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...