Splunk Search

Eval and match create a new field

Splunk_rocks
Path Finder

I have fields like Uid and Case If the case is authentication then then my new field has to show Uid number.

Case. uid

authentication 12r345567

signoff z234567
signoff rt34567
authentication 34r56789
authentication 24r56789

Im just trying to write eval statement like eval New_UId = if(match(case=authentication "uid", "None" )

but could not make it so just posting here ..

Tags (2)
0 Karma
1 Solution

493669
Super Champion

try this run anywhere search:

| makeresults |eval uid=1, case1="authentication"|eval New_UId = if(case1=="authentication" ,uid, "None" )

View solution in original post

0 Karma

493669
Super Champion

try this run anywhere search:

| makeresults |eval uid=1, case1="authentication"|eval New_UId = if(case1=="authentication" ,uid, "None" )
0 Karma

Splunk_rocks
Path Finder

Thanks bud it worked ..

0 Karma

mdsnmss
SplunkTrust
SplunkTrust

You should be able to create a calculated field that is just if(case=authentication,uid,"None")

0 Karma

Splunk_rocks
Path Finder

Thank you mdsnmss

0 Karma
Get Updates on the Splunk Community!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...