Configure the peer indexes
You configure indexes by editing the indexes.conf file. This file determines an indexer's set of indexes, as well as the size and attributes of its buckets. Since all peers in a cluster must use the same set of indexes (except for limited purposes, described later), the
indexes.conf file should ordinarily be the same across all peers.
Note: Like most Splunk Enterprise configuration files, you can have multiple versions of the
indexes.conf file, located in several directories on your Splunk Enterprise instance. For more information on configuration files and how the system layers multiple versions, read "About configuration files" and "Configuration file precedence" in the Admin Manual.
The cluster peers deploy with a peer-specific default
indexes.conf file that handles basic cluster needs. If you want to add indexes or change bucket behavior, you edit a new
indexes.conf file in a special location on the master and then distribute the file simultaneously to all the peers.
Important: You cannot use Splunk Web or the CLI to configure index settings on peer nodes. You must edit
All peers must use the same set of indexes.conf files
The set of
indexes.conf files should ordinarily be identical across all peers in a cluster. In particular, all peers must use the same set of clustered indexes. This is essential for index replication to work properly. (The master node, on the other hand, uses its own, separate
indexes.conf file, because it indexes only its own internal data.) There's a limited exception to this stricture, which is described a bit later.
When you first create the cluster, the master distributes a special default
indexes.conf file to each of the peers. This version supplements the standard default
indexes.conf that all indexers get. The peer-specific default
indexes.conf turns on replication for the
main index, as well as the internal indexes, such as
Depending on your system, you might also need to edit and distribute a modified
indexes.conf to the peers, to accommodate additional indexes or changes to bucket attributes. To ensure that all peers use the same
indexes.conf, you must use the master node to distribute the file to all the peers as a single process.This process, known as the configuration bundle method, is described in "Update common peer configurations".
Important: Although it's possible to distribute the
indexes.conf file to all peers using some other distribution method, only the configuration bundle method is recommended and supported. When you use this method, the master orchestrates the distribution to ensure that all peers have the same set of clustered indexes. If you use another distribution method, you must ensure that settings for any new clustered indexes are successfully distributed to all peers and that all the peers have been reloaded, before you start sending data to the new indexes.
You can also use the configuration bundle method to distribute apps across all the peers. These apps might contain their own
indexes.conf files, which will layer appropriately with any non-app version of the file that you might also distribute to the peers. For information on app distribution, read "How to distribute apps to all the peers".
Note: Under limited circumstances (for example, to perform local testing or monitoring), you can create an
indexes.conf for a single peer only. Such an index will not get replicated. The single-peer
indexes.conf supplements, but does not replace, the common version of the file that all peers get. See "Add an index to a single peer" for details.
Configure a set of indexes for the peers
There are two steps to configuring indexes across the set of peers:
1. Edit a common
indexes.conf on the master. See "Edit indexes.conf".
2. Use the master to distribute the file across the set of peers. See "Distribute the new indexes.conf file to the peers".
These two steps are described below.
For details on configuring
indexes.conf, read the topics in the chapters "Manage indexes" and "Manage index storage" in this manual. For a list of all
indexes.conf attributes, see the indexes.conf specification file in the Admin Manual.
For the most part, you edit the cluster peer
indexes.conf the same as for any indexer. However, there are a few differences to be aware of.
The indexes.conf repFactor attribute
When you add a new index stanza, you must set the
repFactor attribute to
auto. This causes the index's data to be replicated to other peers in the cluster. For example:
[<newindex>] repFactor=auto homePath=<path for hot and warm buckets> coldPath=<path for cold buckets> thawedPath=<path for thawed buckets> ...
Specify homePath and coldPath with forward-slash directory separators
In heterogeneous environments, it's possible that the master node's operating system could use a different convention for specifying directory paths from the peer nodes' operating system. This presents a problem because you edit the
indexes.conf file on the master but then you distribute it to the peers.
For example, if you have a Windows master and a set of Linux peers, the normal way to specify the
homePath on the Windows master, where the file gets edited, would be to use the Windows backward-slash convention as a directory separator, while the Linux peers, where the file gets distributed, require forward slashes.
To deal with this possibility, the best practice is to always use forward slashes when specifying directory paths in
coldPath, no matter which operating systems your master and peers use. For example:
homePath = $SPLUNK_HOME/var/lib/splunk/defaultdb/db
Splunk Enterprise always accepts the forward slash as a directory separator.
Distribute the new indexes.conf file to the peers
Once you've edited
indexes.conf, you need to distribute it to the cluster's set of peer nodes. To learn how to distribute configuration files, including
indexes.conf, across all the peers, read "Update common peer configurations".
For information about other types of peer configuration, including app distribution, read "Configure the peer nodes".
Configure the peer nodes
Configure the search head
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