Splunk Search

Is there a way to dynamically create fields and assign them values while my script is being executed in Splunk for a custom search?

kalyani_y
Explorer

Is there any way to create fields and assign values to them while my script is being executed for custom search?

0 Karma
1 Solution

woodcock
Esteemed Legend

Yes, that is what eval and rex do, among others.

http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/Eval
http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/Rex

If you mean that persist outside the scope of the run of your search, then you need to use outputcsv followed by inputcsv the next time around.

View solution in original post

woodcock
Esteemed Legend

Yes, that is what eval and rex do, among others.

http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/Eval
http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/Rex

If you mean that persist outside the scope of the run of your search, then you need to use outputcsv followed by inputcsv the next time around.

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...