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!

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 ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...