Indexer Clustering Flashcards
What is the reason for an automatic detention?
If disk space runs low (default <5 GB)
Which features are disabled in a manual detention?
- Indexing (except internal)
- Data replication
- Inputs can be blocked if wished (not HEC)
- Continues to participate in searches
Which features are enabled in automatic detention?
none, all indexing features are completely stopped
Does the automatic detention mode recovers by itself?
Yes, if there is sufficient disk space (default > 5GB)
What is a possible scenario for manual detention?
- Shift incoming data from a forwarder to another indexer
- To partially decommission an old indexer (but still use it for searches for existing data)
- Troubleshooting purpose
When should the maintenance mode be activated?
Only for maintenance reason (eg updates, switch from single site to multi site etc.)
What happens if a cluster is in maintenance mode?
It prevents the cluster from bucket fixup tasks and also from rolling buckets
Which command puts the cluster into maintenance mode?
./splunk enable maintenance-mode
What is the difference between ./splunk stop and ./splunk offline in a clustered environment ?
./splunk stop is not recommended in a clustered environment. With ./splunk offline the CM makes sure to re-assign or copy primary buckets to other peers to have at least a valid cluster. Once the CM finishes this task, the peer goes offline. The CM then waits for 60 seconds until the peer comes back (can be extended). If the peer does not come back, the CM starts bucket fixup activities to gain a complete cluster state.
Which command decommissions a peer permanent?
/.splunk offline –enforce-counts
What types of rebalancing does the cluster support?
Primary and data rebalancing
What does primary rebalancing mean?
It means that the CM marks the primary buckets evenly to ensure that each peer has approx. the same number of primary copies. It does not copy the buckets, it just re-assigns the markers. There is no movement of buckets, and because of this limitation there will be never a perfect distribution of primary buckets. It automatically happens at the end of a rolling restart or if a new peer joins or re-joins. It also can be done through a REST call.
Whats does data rebalancing mean?
Data rebalancing means to distribute the data storage evenly across all peers. It balances primary, searchable, non-searchable buckets so that each indexer has approx. the same amount of buckets. It does move buckets from one peer to another. The rebalance can be started through the GUI or through CLI or REST. You can set an attribute to make sure that searching is still possible (search-safe feature). An imbalance usually happens if a new peer joins the cluster or if a Forwarder does no distribute properly. Best practise is to perform a ‘remove excessive buckets’ task before a rebalancing to make sure that the process is efficient.
Command to perform a data rebalancing:
splunk rebalance cluster-data -action start [-searchable true] [-index index_name] [-max_runtime interval_in_minutes]
What is the idea behind the ‘remove excessive buckets’ feature?
Lets assume a peer goes offline for longer, or there is a network outage and one indexer can not connect properly. The CM recognizes it since there is no hearbeat sent by the peer. The CM starts fixup activities to recover into a valid/complete state, means the CM re-assigns primary buckets and may copies buckets. Lets assume the indexer comes back. Now the picture looks different, since another peer took over the data which the missing peer held. Means, there is excessive data in the cluster. This has no negative impact on the cluster itself, but is consumes storage. This excessive buckets can be removed through this feature.
List the migration procedure from a single site cluster to a multi site cluster
1) Breath
2) Make sure that the new servers meet the system requierements (CPU, RAM, storage, IOPS etc.)
3) Install all the new servers with Splunk Enterprise (same version)
4) Configure the CM with the new multi site configuration (do not delete single site policy)
5) Put the CM into maintenance mode
6) Configure all other new instances (SHs and IDXs) for multi-site (do not delete the single site config)
7) Disable maintenance mode, check log for errors and CM dashboard
8) If required, configure Forwarders for indexer discovery and site awareness
How does the configuration looks like if you want to setup a CM initially for a single site environment with a rep factor of 2 and a search factor of 3 ?
./splunk edit cluster-config -mode master -replication_factor 2 -search_factor 2 -secret mysecret
How does the configuration looks like if you want to setup an indexer initially for a single site environment with the replication port set to 9887 and a secret ‘mysecret’ ?
./splunk edit cluster-config -mode slave -master_uri https://cm:8089 -replication_port 9887 -secret mysecret