Splunk Search

Reusable knowledge objects

splunker12er
Motivator

Fields created using the below methods will persist as a knowledge objects and are reusable in multiple searches ?

rex
erex
Interactive field extractor
eval
multikv

please help me in this, multiple answers..

0 Karma
1 Solution

splunker12er
Motivator

Answer:
1. Interactive field extractor
2. EVAL

View solution in original post

0 Karma

splunker12er
Motivator

Answer:
1. Interactive field extractor
2. EVAL

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

To clarify for future generations, this refers to eval as the props.conf setting for calculated fields, not to eval the search command.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

rex, erex, eval, and multikv are all search commands so their effect is limited to that search. The ifx stores the extractions in the configuration, those fields will be usable in other searches where permissions allow.

splunker12er
Motivator

I refer the doc foe EVAL statement. When i create a calculated field using EVAL statement , this can be reused right?

Is this a available as a index time extracted field/search time ? I am little confused in this. Please advise.

EVAL-<fieldname> = <eval statement>
* Use this to automatically run the <eval statement> and assign the value of the output 
  to <fieldname>. This creates a "calculated field."
* When multiple EVAL-* statements are specified, they behave as if 
  they are run in parallel, rather than in any particular sequence.  
  For example say you have two statements: EVAL-x = y*2 and EVAL-y=100. In this case, "x" 
  will be assigned the original value of "y * 2," not the value of "y" after it is set to 100.
* Splunk processes calculated fields after field extraction and field aliasing but before 
  lookups. This means that:
        * You can use a field alias in the eval statement for a calculated field.
        * You cannot use a field added through a lookup in an eval statement for a calculated
          field.       

eg:
EVAL-Result=Price+Tax

Can Result value be re-used?

0 Karma

aweitzman
Motivator

Yes, if you add this EVAL statement to a props.conf file and restart Splunk, you will be able to use the result everywhere that has visibility to that props.conf file. So if you add it to Splunk's main one, or to an app being shared globally, it will be usable everywhere.

splunker12er
Motivator

Guess the answer should be Eval and IFX.

0 Karma

mattness
Splunk Employee
Splunk Employee

For more information about reusing eval statements, see this topic on calculated fields: http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/definecalcfields

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...