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 (5)
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"

 

Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...