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..
Answer:
1. Interactive field extractor
2. EVAL
To clarify for future generations, this refers to eval as the props.conf setting for calculated fields, not to eval the search command.
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.
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?
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.
Guess the answer should be Eval and IFX.
For more information about reusing eval statements, see this topic on calculated fields: http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/definecalcfields