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!

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