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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...