Splunk Search

How to evaluate to Field Value SPL?

mohsplunking
Explorer

Hello Splunkers,

I need some help with writing a SPL, I have a field  called "DcPolicyAction" where the value could be 0 or 1, if its 0 I want to basically call it Successful and If its 1 it is Failure , can someone help me with the SPL syntax.  I dont want to use the stats command. Just a simple query that lists the field.

 

Thank you,

 

regards,

Moh.

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval DcActionValue=if(DcActionValue=0,"Successful","Failure")

View solution in original post

0 Karma

mohsplunking
Explorer

Thanks ITWHisperer , Much Appreciated !

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval DcActionValue=if(DcActionValue=0,"Successful","Failure")
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...