Set limits on disk usage
Splunk uses several methods to control disk space. Indexes consume most of the disk space. If you run out of disk space, Splunk stops indexing. You can set a minimum free space limit to control how low free disk space falls before indexing stops. Indexing resumes once space exceeds the minimum.
Note: To determine how much space you need for your indexes, see "Estimate your storage requirements" in the Installation Manual.
Set minimum free disk space
You can set a minimum amount of free disk space for the disk where indexed data is stored. If the limit is reached, Splunk stops operating. Both indexing and searching are affected:
- Periodically, Splunk checks space on all partitions that contain indexes. If the free disk space limit has been reached on any of those partitions, Splunk stops indexing data until more space is available. A UI banner and
splunkdwarning are posted to indicate the need to clear more disk space.
- Before attempting to launch a search, Splunk requires that the specified amount of free space be available on the file system where the dispatch directory is stored,
The default minimum free disk space is 2000MB.
- Splunk does not clear any of its disk space with this method. It simply pauses until more space becomes available.
- Incoming data can be lost while indexing is suspended.
You can set minimium free disk space through Splunk Web, the CLI, or the
server.conf configuration file.
In Splunk Web
To specify minimum disk usage in Splunk Web:
1. Click Manager in the upper right corner of Splunk Web.
2. Click System settings.
3. Click General settings.
4. Under the Index settings section, set the field called Pause indexing if free disk space (in MB) falls below:
5. Enter the desired minimum free disk space in megabytes.
6. Click Save.
7. Restart Splunk for your changes to take effect.
From the command line interface (CLI)
You can set the minimum free disk space with Splunk's CLI. This example sets the minimum free disk space to 20,000MB (20GB):
splunk set minfreemb 20000 splunk restart
For information on using the CLI, see "About the CLI" in the Admin manual.
You can also set the minimum free disk space in the server.conf file. The relevant stanza/attribute is this:
[diskUsage] minFreeSpace = <num>
<num> represents megabytes. The default is 2000.
Control index storage
The indexes.conf file contains index configuration settings. You can control disk storage usage by specifying maximum index size or maximum age of data. When one of these limits is reached, the oldest indexed data will be deleted (the default) or archived. You can archive the data by using a predefined archive script or creating your own.
For detailed instructions on how to use
indexes.conf to set maximum index size or age, see "Set a retirement and archiving policy".
For detailed information on index storage, see "How Splunk stores indexes".
Configure maximum index size
Configure bloom filters
This documentation applies to the following versions of Splunk® Enterprise: 5.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9, 5.0.10, 5.0.11, 5.0.12, 5.0.13, 5.0.14, 5.0.15, 5.0.16, 5.0.17, 5.0.18