Admin Manual

 


About the Splunk Admin Manual
How Splunk Works

Macro searches

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

Macro searches

Macro searches are a powerful new feature for saved searches. Save searches with macro fields, which are values you set at search time. You can create a sophisticated saved search with as many macro fields as you like.

Use macro searches in Splunk Web or in Splunk's CLI. Macro searches work similarly to form searches, except there is no graphical user interface component.

Configure a macro search

host=swan OR host=pearl $user$ $trans$
|savedsearch usertrans user=KateAusten trans=query

Note: Use the "I" (pipe) operator before the savedsearch command.

host=swan OR host=pearl user=KateAusten trans=query

This documentation applies to the following versions of Splunk: 3.3 , 3.3.1 , 3.3.2 , 3.3.3 , 3.3.4 , 3.4 , 3.4.1 , 3.4.2 , 3.4.3 , 3.4.5 , 3.4.6 , 3.4.8 , 3.4.9 , 3.4.10 , 3.4.11 , 3.4.12 , 3.4.13 , 3.4.14 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.