Splunk Search

Found useful trick to have field values as new fields with {field}

splunkreal
Motivator

Hello,

we found useful trick to have field values as new fields, for example :

 

 

 

| eval {status}=status | timechart count count(failed) as FAILED | eval failed_percent=FAILED/count*100 

 

 

 

How do you call this? Is is documented?

Thanks 🙂

 

* If this helps, please upvote or accept solution if it solved *
Labels (4)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

There is a tiny sentence associated with that feature in the eval documentation page

https://docs.splunk.com/Documentation/Splunk/9.0.2/SearchReference/Eval#Field_names

I believe I have seen this spoken about as 'dummy encoding', but that is not in those pages.

It is a VERY useful feature, as it supports that syntax within any other text, so you can do stuff like

| eval a=random(), b=random(), my_random1_{a}_and_random2_{b}_vars="done"

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

There is a tiny sentence associated with that feature in the eval documentation page

https://docs.splunk.com/Documentation/Splunk/9.0.2/SearchReference/Eval#Field_names

I believe I have seen this spoken about as 'dummy encoding', but that is not in those pages.

It is a VERY useful feature, as it supports that syntax within any other text, so you can do stuff like

| eval a=random(), b=random(), my_random1_{a}_and_random2_{b}_vars="done"

 

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...