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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...