Splunk® Enterprise

Search Reference

Download manual as PDF

Splunk Enterprise version 6.x is no longer supported as of October 23, 2019. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF



Anonymizes the search results using the dictionary and configuration files found in $SPLUNK_HOME/etc/anonymizer, unless others are specified.


scrub [public-terms=<filename>] [private-terms=<filename>] [name-terms=<filename>] [dictionary=<filename>] [timeconfig=<filename>]

Optional arguments

Syntax: public-terms=<filename>
Description: Specify a filename that includes the public terms to be anonymized.
Syntax: private-terms=<filename>
Description: Specify a filename that includes the private terms to be anonymized.
Syntax: name-terms=<filename>
Description: Specify a filename that includes names to be anonymized.
Syntax: dictionary=<filename>
Description: Specify a filename that includes a dictionary of terms to be anonymized.
Syntax: timeconfig=<filename>
Description: Specify a filename that includes time configurations to be anonymized.


Anonymizes the search results by replacing identifying data - usernames, ip addresses, domain names, etc. - with fictional values that maintain the same word length. For example, it may turn the string user=carol@adalberto.com into user=aname@mycompany.com. This lets Splunk users share log data without revealing confidential or personal information. By default the dictionary and configuration files found in $SPLUNK_HOME/etc/anonymizer are used. These can be overridden by specifying arguments to the scrub command. The arguments exactly correspond to the settings in the stand-alone CLI anonymize command, and are documented there.

Anonymizes all attributes, except those that start with _ (except _raw) or date_, or the following attributes: eventtype, linecount, punct, sourcetype, timeendpos, timestartpos.


Example 1: Anonymize the current search results.

... | scrub


Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the scrub command.

Last modified on 25 November, 2014

This documentation applies to the following versions of Splunk® Enterprise: 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.0.15, 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13, 6.1.14, 6.2.13, 6.2.14, 6.2.15

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters