Admin Manual

 


Assign metadata to events dynamically

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Assign metadata to events dynamically

Dynamically assign metadata to files as they are being consumed by Splunk. Use this feature to specify source type, host, or other metadata dynamically for for incoming data.

Important: This feature is supported for use with batch (one time upload) inputs only. Splunk does not recommend using dynamic metadata assignment with ongoing monitoring (tail) inputs. For more information about file inputs, refer to Monitor files and directories in this manual.

Append a single dynamic input header to your file and specify the metadata fields you'd like. You can see the available pipeline metadata fields in transforms.conf.spec.

You can use this method to assign metadata instead of editing inputs.conf, props.conf and transforms.conf.

Configuration

Edit a data file to add a single dynamic input header.

***SPLUNK*** $ATTR1=$VAL1 $ATTR2=$VAL2 etc.

Set values with a script

Write a script to automatically add a dynamic input header to your incoming data streams. Your script can also set attributes dynamically based on the contents of your file.

This documentation applies to the following versions of Splunk: 4.0 , 4.0.1 , 4.0.2 , 4.0.3 , 4.0.4 , 4.0.5 , 4.0.6 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!