<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://coolscript.net/index.php?action=history&amp;feed=atom&amp;title=Setup_Splunk_with_Index_and_SearchHead_Cluster</id>
	<title>Setup Splunk with Index and SearchHead Cluster - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://coolscript.net/index.php?action=history&amp;feed=atom&amp;title=Setup_Splunk_with_Index_and_SearchHead_Cluster"/>
	<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Setup_Splunk_with_Index_and_SearchHead_Cluster&amp;action=history"/>
	<updated>2026-06-02T18:20:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://coolscript.net/index.php?title=Setup_Splunk_with_Index_and_SearchHead_Cluster&amp;diff=952&amp;oldid=prev</id>
		<title>Admin: Created page with &quot; =Purpose= *Setup a demo Lab with a clustered Splunk environment, based on CLI commands  &#039;&#039;&#039;&lt;br&gt; *NOTE: Only to be used temporary in test environments&#039;&#039;&#039;  =TestSetup=  ==Host...&quot;</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Setup_Splunk_with_Index_and_SearchHead_Cluster&amp;diff=952&amp;oldid=prev"/>
		<updated>2023-07-05T07:17:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; =Purpose= *Setup a demo Lab with a clustered Splunk environment, based on CLI commands  &amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; *NOTE: Only to be used temporary in test environments&amp;#039;&amp;#039;&amp;#039;  =TestSetup=  ==Host...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=Purpose=&lt;br /&gt;
*Setup a demo Lab with a clustered Splunk environment, based on CLI commands  &amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
*NOTE: Only to be used temporary in test environments&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=TestSetup=&lt;br /&gt;
&lt;br /&gt;
==Host Environment==&lt;br /&gt;
*/etc/hosts&lt;br /&gt;
 #List of required Splunk instances with IP and Hostname in order of the installation&lt;br /&gt;
 #-----------------------------------------------------------------------------------&lt;br /&gt;
 #Index Cluster&lt;br /&gt;
 192.168.178.109 splunk-cluster-master&lt;br /&gt;
 192.168.178.110 splunk-idx-cluster-indexer-0&lt;br /&gt;
 192.168.178.111 splunk-idx-cluster-indexer-1&lt;br /&gt;
 192.168.178.112 splunk-idx-cluster-indexer-2&lt;br /&gt;
 #Search Head Cluster&lt;br /&gt;
 192.168.178.113 splunk-sh-cluster-search-head-0&lt;br /&gt;
 192.168.178.114 splunk-sh-cluster-search-head-1&lt;br /&gt;
 192.168.178.115 splunk-sh-cluster-search-head-2&lt;br /&gt;
 192.168.178.116 splunk-sh-cluster-deployer&lt;br /&gt;
 #Monitoring&lt;br /&gt;
 192.168.178.117 splunk-mc-monitoring-console&lt;br /&gt;
 #Universal Forwarder&lt;br /&gt;
 192.168.178.118 splunk-uf-01&lt;br /&gt;
 192.168.178.120 splunk-uf-02&lt;br /&gt;
&lt;br /&gt;
==Templates==&lt;br /&gt;
The one in bold is used&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;splunk-8.2.11-e73c56f930c5-linux-2.6-amd64.deb&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 splunk-8.2.11-e73c56f930c5-x64-release.msi&lt;br /&gt;
 splunk-9.0.5-e9494146ae5c-linux-2.6-amd64.deb&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;splunkforwarder-9.0.5-e9494146ae5c-linux-2.6-amd64.deb&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 splunkforwarder-9.0.5-e9494146ae5c-x64-release.msi&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
===Environment requirements===&lt;br /&gt;
*Debian Bookworm, Bridged VMs for each Splunk instance (x 11), each with 2CPUs, 4GB RAM, 64GB HD&lt;br /&gt;
*Working as root&lt;br /&gt;
*Fully network access to each other, no port restrictions&lt;br /&gt;
*Internet access everywhere (No Proxies!)&lt;br /&gt;
&lt;br /&gt;
===Splunk disclaimer===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important Note&amp;#039;&amp;#039;&amp;#039; that this installation is based on the &amp;#039;&amp;#039;&amp;#039;trial License&amp;#039;&amp;#039;&amp;#039; which Splunk set at the first start. &amp;lt;br&amp;gt;&lt;br /&gt;
Once started it  counts for &amp;#039;&amp;#039;&amp;#039;60 days&amp;#039;&amp;#039;&amp;#039; before the setup becomes unusable anymore.&lt;br /&gt;
&lt;br /&gt;
===Quickstart Reference===&lt;br /&gt;
*Debian specific but may work on Ubuntu too&lt;br /&gt;
 apt-get install curl&lt;br /&gt;
 dpkg -i splunk-8.2.11-e73c56f930c5-linux-2.6-amd64.deb&lt;br /&gt;
 /opt/splunk/bin/splunk start --accept-license --answer-yes&lt;br /&gt;
 /opt/splunk/bin/splunk enable web-ssl&lt;br /&gt;
 /opt/splunk/bin/splunk set web-port 443&lt;br /&gt;
 /opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
===Quickdelete Reference===&lt;br /&gt;
*Debian specific but may work on Ubuntu too&lt;br /&gt;
 dpkg --purge --force-all splunk&lt;br /&gt;
 rm -rf /opt/splunk&lt;br /&gt;
&lt;br /&gt;
==Cluster==&lt;br /&gt;
===Cluster Master===&lt;br /&gt;
*Start with the cluster master, note replication_factor and search_factor, the secret requires a min length&lt;br /&gt;
 root@splunk-cluster-master:&amp;#039;&amp;#039;&amp;#039;/opt/splunk/bin/splunk edit cluster-config -mode master -replication_factor 3 -search_factor 2 -secret idxSymmKey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 root@splunk-cluster-master:&amp;#039;&amp;#039;&amp;#039;/opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
===Cluster Peer 0 ===&lt;br /&gt;
 root@splunk-idx-cluster-indexer-0:/opt/splunk/bin/splunk enable listen 9997&lt;br /&gt;
 root@splunk-idx-cluster-indexer-0:/opt/splunk/bin/splunk edit cluster-config -mode peer -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey -replication_port 9100&lt;br /&gt;
 root@splunk-idx-cluster-indexer-0:/opt/splunk/bin/splunk restart&lt;br /&gt;
===Cluster Peer 1 ===&lt;br /&gt;
 root@splunk-idx-cluster-indexer-1:/opt/splunk/bin/splunk enable listen 9997&lt;br /&gt;
 root@splunk-idx-cluster-indexer-1:/opt/splunk/bin/splunk edit cluster-config -mode peer -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey -replication_port 9100&lt;br /&gt;
 root@splunk-idx-cluster-indexer-1:/opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
===Cluster Peer 2 ===&lt;br /&gt;
 root@splunk-idx-cluster-indexer-2:/opt/splunk/bin/splunk enable listen 9997&lt;br /&gt;
 root@splunk-idx-cluster-indexer-2:/opt/splunk/bin/splunk edit cluster-config -mode peer -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey -replication_port 9100&lt;br /&gt;
 root@splunk-idx-cluster-indexer-2:/opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
==Search Head==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: the secret requires a min length otherwise the setup will not work&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
===SH0===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk init shcluster-config -mgmt_uri https://splunk-sh-cluster-search-head-0:8089 -replication_port 9200 -secret shclusterabcd&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk restart&lt;br /&gt;
===SH1===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-1:/opt/splunk/bin/splunk init shcluster-config -mgmt_uri https://splunk-sh-cluster-search-head-1:8089 -replication_port 9200 -secret shclusterabcd&lt;br /&gt;
 root@splunk-sh-cluster-search-head-1:/opt/splunk/bin/splunk restart&lt;br /&gt;
===SH2===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-2:/opt/splunk/bin/splunk init shcluster-config -mgmt_uri https://splunk-sh-cluster-search-head-2:8089 -replication_port 9200 -secret shclusterabcd&lt;br /&gt;
 root@splunk-sh-cluster-search-head-2:/opt/splunk/bin/splunk restart&lt;br /&gt;
===Bootstrap===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk bootstrap shcluster-captain -servers_list https://splunk-sh-cluster-search-head-0:8089,https://splunk-sh-cluster-search-head-1:8089,https://splunk-sh-cluster-search-head-2:8089&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk restart&lt;br /&gt;
*It makes sense to check the setup after the above was applied. Check kvstore status and the mc&lt;br /&gt;
&lt;br /&gt;
===Add SH0 to Index Cluster===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk edit cluster-config -mode searchhead -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey&lt;br /&gt;
 root@splunk-sh-cluster-search-head-0:/opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
===Add SH1 to Index Cluster===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-1:/opt/splunk/bin/splunk edit cluster-config -mode searchhead -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey&lt;br /&gt;
 root@splunk-sh-cluster-search-head-1:/opt/splunk/bin/splunk restart&lt;br /&gt;
===Add SH2 to Index Cluster===&lt;br /&gt;
 root@splunk-sh-cluster-search-head-2:/opt/splunk/bin/splunk edit cluster-config -mode searchhead -manager_uri https://splunk-cluster-master:8089 -secret idxSymmKey&lt;br /&gt;
 root@splunk-sh-cluster-search-head-2:/opt/splunk/bin/splunk restart&lt;br /&gt;
&lt;br /&gt;
==Universal Forwarder==&lt;br /&gt;
Check This: https://docs.splunk.com/Documentation/Splunk/9.0.5/DistSearch/SHCandindexercluster&lt;br /&gt;
===UF0===&lt;br /&gt;
*/opt/splunkforwarder/etc/system/local/inputs.conf&lt;br /&gt;
 [monitor:///var/log/auth.log]&lt;br /&gt;
 disabled=false&lt;br /&gt;
 sourcetype=auth&lt;br /&gt;
  &lt;br /&gt;
 [monitor:///var/log/syslog]&lt;br /&gt;
 disabled=false&lt;br /&gt;
 sourcetype=syslog&lt;br /&gt;
&lt;br /&gt;
*/opt/splunkforwarder/etc/system/local/outputs.conf&lt;br /&gt;
 [tcpout]&lt;br /&gt;
 defaultGroup=indexer1&lt;br /&gt;
 &lt;br /&gt;
 [tcpout:indexer1]&lt;br /&gt;
 server=192.168.178.110:9997,192.168.178.111:9997,192.168.178.112:9997&lt;br /&gt;
&lt;br /&gt;
===UF1===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE THAT UF1 USES ONLY ONE INDEXER&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*/opt/splunkforwarder/etc/system/local/inputs.conf&lt;br /&gt;
 [monitor:///var/log/auth.log]&lt;br /&gt;
 disabled=false&lt;br /&gt;
 sourcetype=auth&lt;br /&gt;
  &lt;br /&gt;
 [monitor:///var/log/syslog]&lt;br /&gt;
 disabled=false&lt;br /&gt;
 sourcetype=syslog&lt;br /&gt;
&lt;br /&gt;
*/opt/splunkforwarder/etc/system/local/outputs.conf&lt;br /&gt;
 [tcpout]&lt;br /&gt;
 defaultGroup=indexer1&lt;br /&gt;
 &lt;br /&gt;
 [tcpout:indexer1]&lt;br /&gt;
 server=192.168.178.110:9997&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Happy testing&lt;br /&gt;
*Aftermath&lt;br /&gt;
**Switch to &amp;#039;&amp;#039;&amp;#039;Distributed Mode&amp;#039;&amp;#039;&amp;#039; from the mc web page of the &amp;#039;&amp;#039;&amp;#039;https://splunk-cluster-master&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**Switch off the MC on all Splunk Instances except the cluster-master&lt;br /&gt;
 /opt/splunk/bin/splunk disable app splunk_monitoring_console&lt;br /&gt;
*consideration&lt;br /&gt;
**Remove the MC app from the SH Cluster(s) beforehand, just to make sure its being removed&lt;br /&gt;
**The MC must run only once clusterwide on: &amp;#039;&amp;#039;&amp;#039;https://splunk-cluster-master&amp;#039;&amp;#039;&amp;#039; - nowwhere else&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
*https://github.com/juanlittledevil/splunk-cluster-training/blob/master/README.md&lt;br /&gt;
*https://docs.splunk.com/Documentation/Splunk/9.0.4/Indexer/MultisiteCLI&lt;br /&gt;
*Nice: https://www.aplura.com/assets/pdf/shc_cheatsheet.pdf&lt;br /&gt;
*https://kinneygroup.com/blog/the-rules-of-the-search-head-cluster-shc/&lt;br /&gt;
*https://blog.avotrix.com/splunk-search-head-cluster-configuration/&lt;br /&gt;
*https://ashvinpandey.medium.com/steps-to-create-search-head-cluster-in-splunk-19106909e148&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>