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!

Splunk is Nurturing Tomorrow’s Cybersecurity Leaders Today

Meet Carol Wright. She leads the Splunk Academic Alliance program at Splunk. The Splunk Academic Alliance ...

Part 2: A Guide to Maximizing Splunk IT Service Intelligence

Welcome to the second segment of our guide. In Part 1, we covered the essentials of getting started with ITSI ...

Part 1: A Guide to Maximizing Splunk IT Service Intelligence

As modern IT environments continue to grow in complexity and speed, the ability to efficiently manage and ...