Admin Manual

 


Set limits on disk usage

Set limits on disk usage

There are several methods for controlling disk space used by Splunk. Most disk space will be used by Splunk's indexes, which include the compressed raw data. If you run out of disk space, Splunk will stop indexing. You can set a minimum free space limit to control how low you will let free disk space fall before indexing stops. Indexing will resume once space exceeds the minimum.

Set minimum free disk space

You can set a minimum amount of space to keep free on the disk where indexed data is stored. If the limit is reached, splunkd stops operating. Both indexing and searching are affected:

The default minimum free disk space is 2000MB.

Note:

You can set minimium free disk space through Splunk Web, the CLI, or the server.conf configuration file.

In Splunk Web

Disk settings.jpg

Restart Splunk for your changes to take effect.

From the command line interface (CLI)

You can set the minimum free disk space via Splunk's CLI. To use the CLI, navigate to the $SPLUNK_HOME/bin/ directory and use the ./splunk command. Here, you set the minimum free disk space to 20,000MB (20GB):

# splunk set minfreemb 20000

# splunk restart

In server.conf

You can also set the minimum free disk space in the server.conf file. The relevant stanza/attribute is this:

[diskUsage]
minFreeSpace = <num>

Note that <num> represents megabytes. The default is 2000.

Control database 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 information on creating archive scripts, see "Archive indexed data".

For detailed information on index storage, see "How Splunk stores indexes".

This documentation applies to the following versions of Splunk: 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 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.