Archiving Splunk Enterprise indexes to Amazon S3
For best performance and to avoid bucket size limits, you should use the S3A filesystem that was introduced in Apache Hadoop 2.6.0. Configuration for different Hadoop distribution may differ.
Configure archiving to Amazon S3
To enable Hunk to archive Splunk data to S3:
1. Add the following configuration to your providers:
Hadoop Home: /absolute/path/to/apache/hadoop-2.6.0 vix.fs.s3a.access.key: <AWS access key> vix.fs.s3a.secret.key: <AWS secret key> vix.env.HADOOP_TOOLS: $HADOOP_HOME/share/hadoop/tools/lib vix.splunk.jars: $HADOOP_TOOLS/hadoop-aws-2.6.0.jar,$HADOOP_TOOLS/aws-java-sdk-1.7.4.jar,$HADOOP_TOOLS/jackson-databind-2.2.3.jar,$HADOOP_TOOLS/jackson-core-2.2.3.jar,$HADOOP_TOOLS/jackson-annotations-2.2.3.jar
2. Using the above configuration, now create an archive index with path prefixed with
In this example,
s3ais the implementation Hadoop will use to transfer and read files from the supplied path
bucketis the name of your S3 bucket
/path/to/archiveare directories within the bucket
Further configuration for unique setups
You may need to further configure Hunk to search S3 archives depending on the specifics of your configuration.
If you are using a search head exclusively
If you're just using a search head to search your archives, then set the provider's
vix.mode attribute to
vix.mode = stream
vix.mode is set to
stream, Hunk streams all the data the search matches to the search head, and will not spawn MapReduce jobs on Hadoop.
If you have configured a search head with a Hadoop cluster
If the Hadoop version for search head archive indexes is compatible with your Hadoop cluster, no additional configuration is necessary to search your archive indexes. Just go to the Splunk Web search bar and enter:
The search head will spawn Hadoop MapReduce jobs against your archive when it's appropriate to do so.
If your Hadoop cluster version is not compatible with your Hadoop Home version
You can still use Hunk Archives if your Hadoop cluster is not compatible with your Hadoop client libraries (that have the S3a filesystem). An example of this is if you are using Apache Hadoop 2.6.0 for archiving, but you are using Hadoop 1.2.0 for your Hadoop cluster. To do this, use the older S3n filesystem to search your archives.
To configure S3n and an older Hadoop cluster to search your archives:
1. Configure a provider for your Hadoop cluster.
2. For every archive index, configure indexes.conf from your terminal and add a new virtual index with these properties:
[<virtual_index_name_of_your_choosing>] vix.output.buckets.path = <archive_index_destination_path_with_s3n_instead_of_s3a> vix.provider = <hadoop_cluster_provider>
3. Make sure the
vix.output.buckets.path is S3n so that Hunk can search using the older filesystem to search your archives..
For example. Given an archive index named "main_archive", destination path "s3a://my-bucket/archive_root/main_archive" and provider = "hadoop_cluster", you should configure a virtual index like this:
vix.output.buckets.path = s3n://my-bucket/archive_root/main_archive
vix.provider = hadoop_cluster
Known Issues with Hunk using S3
When using Hadoop's S3N filesystem, you're limited to uploading files that are less than 5GB. While it's rare, it's possible that Splunk buckets become larger than 5GB. These buckets would not get archived when using the S3N filesystem.
If you use the S3N filesystem, configure your indexes to roll buckets from hot to warm at a size less than 5 GB via the
maxDataSize attribute in
Hunk archiving requires, at a minimum, read-after-write consistency. For the US Standard region, S3 only guarantees this when accessed via the Northern Virginia endpoint. See the Amazon AWS S3 FAQ for more details.
For more information about archiving with S3a, see <a href="http://blogs.splunk.com/2015/02/11/faster-and-limitless-hunk-archiving-to-s3-with-hadoop-2-6-0/">this blog about faster and limitless archiving with S3A</a>.
Bucket raw data limit
Because of how Hadoop interacts with the S3 file system, Hunk cannot currently archive buckets with raw data sets larger than 5GB to S3.
We recommend that you use a S3FileSystem implementation that supports uploads larger than 5GB. To ensure that all your data is archived, configure your indexes to roll buckets from hot to warm at a size less than 5 GB via the
maxDataSize attribute in
Data copy process
When archiving to S3, data is copied twice. This is because S3 does not support file renaming and the FileSystem implementation Hunk currently uses implements file rename as follows:
- Download the file
- Upload it renamed
- Delete the original file
This process does not create duplicate data in your archive.
Bandwidth throttling limitations
Hunk cannot guarantee that bandwidth throttling will be respected when archiving to S3. Hunk will still attempt to throttle bandwidth where possible, if configured to do so.
Archive Splunk indexes with the user interface
Archive cold buckets to frozen
This documentation applies to the following versions of Hunk®(Legacy): 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.3.5, 6.3.6, 6.3.7, 6.3.8, 6.3.9, 6.3.10, 6.3.11, 6.3.12, 6.3.13, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.10, 6.4.11