Splunk® Enterprise

Managing Indexers and Clusters of Indexers

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

Configure the cluster with the CLI

You can use the CLI to perform a wide set of cluster activities, including:

Some clustering commands are available only on master nodes; others are available only on peer nodes.

Get help on the CLI commands

The CLI provides complete online help for the clustering commands. For general help on the full set of clustering commands, go to $SPLUNKHOME/bin and type:

splunk help cluster

For help on specific commands, specify the command name. For example:

splunk list cluster-config

For general information on the CLI, read the "Use Splunk's command line interface (CLI)" chapter in the Admin manual, or type:

splunk help 

Enable cluster nodes

You can enable instances as cluster nodes with the edit cluster-config command. After enabling an instance, you must restart it.

For details on the specific command-line options, read "Configure the cluster with server.conf".

Enable the master node

To enable an instance as a master node, set mode to "master" and configure other cluster options as needed:

splunk edit cluster-config -mode master -replication_factor 4 -search_factor 3 

splunk restart

Important: When the master starts up for the first time, it will block indexing on the peers until you have enabled and restarted the full replication factor number of peers.

Enable peer nodes

To enable an instance as a peer node, set mode to "slave". You also need to specify the master_uri and the replication_port:

splunk edit cluster-config -mode slave -master_uri -replication_port 9887 

splunk restart

Enable the search head

To enable an instance as a search head, set mode to "searchhead". You also need to specify the master_uri:

splunk edit cluster-config -mode searchhead -master_uri  

splunk restart

or if you are using a pass4SymmKey include it in the command:

splunk edit cluster-config -mode searchhead -master_uri  -secret your_key 

splunk restart

Specify a security key

You can optionally specify a security key for the cluster by appending the -secret flag when you enable each cluster node. For example:

splunk edit cluster-config -mode slave -master_uri -replication_port 9887 -secret your_key

The security key authenticates communication between the master and the peers and search heads. The key, if specified, must be the same across all cluster instances. If, for example, you specify it for the master, you must also specify it for all peers and search heads.

Edit cluster configurations

You can also use the edit cluster-config command to change cluster node configurations after the node has been enabled. Refer to the CLI clustering help, along with the server.conf specification file, for the list of configurable settings.

View cluster information

There are a number of list commands that return different types of cluster information. For example, to get detailed information on each peer in the cluster, run this command on the master:

splunk list cluster-peers

To get information on the cluster configuration, run this command from any node:

splunk list cluster-config

See the CLI clustering help for the full set of list commands.

Manage the cluster

You can also use the CLI to perform a number of different actions on the cluster. Those actions are described in their own topics:

Last modified on 28 June, 2016
Configure the cluster with server.conf
View the master dashboard

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

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