<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What are my options to track the captain switch over time in a search head cluster? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264444#M10056</link>
    <description>&lt;P&gt;I have a 6 node Search Head Cluster deployment. What are my options to figure out the Captain switch over time?&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 21:20:02 GMT</pubDate>
    <dc:creator>rbal_splunk</dc:creator>
    <dc:date>2016-09-01T21:20:02Z</dc:date>
    <item>
      <title>What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264444#M10056</link>
      <description>&lt;P&gt;I have a 6 node Search Head Cluster deployment. What are my options to figure out the Captain switch over time?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 21:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264444#M10056</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2016-09-01T21:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264445#M10057</link>
      <description>&lt;P&gt;Here are two options that will work for you&lt;/P&gt;

&lt;P&gt;Option 1: Use Splunkd.log and use a search like “SHPoolingMgr - Making node the captain”. Only the Node with this message will be the Captain.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal  (host=SH1  OR   host=SH2   OR host=SH3  OR host=SH4  OR host=SH5  OR host=SH6) sourcetype=splunkd "Making node the captain"   | table host _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result:&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/157198-2.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Option 2:  You can search metrics.log on a node to check if it has been the Captain. For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08-31-2016 18:27:07.094 +0000 INFO Metrics - group=captainstability, stable_follower_pct=0, stable_captain_pct=100, num_polled_captain=155, num_polled_follower=0, num_polled_candidate=0, upgrades_to_captain=0, downgrades_from_captain=0, captain_changes=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This changes every poll period, so maybe look for the stable_captain_pct &amp;gt; 0 during any time frame shows that was captain during that time.&lt;/P&gt;

&lt;P&gt;Search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal (host=SH1  OR   host=SH2   OR host=SH3  OR host=SH4  OR host=SH5  OR host=SH6)   sourcetype=metrics  stable_captain_pct &amp;gt; 0 | timechart count by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/157199-1.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264445#M10057</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2020-09-29T10:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264446#M10058</link>
      <description>&lt;P&gt;Use the distributed management console (DMC). I have it enabled on our deployer.&lt;/P&gt;

&lt;P&gt;In DMC&lt;/P&gt;

&lt;P&gt;search -&amp;gt; search head clustering -&amp;gt; status and configuration &lt;/P&gt;

&lt;P&gt;Look for the captain election activity (it is a panel) and captain selection details (a panel to the right)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 21:31:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264446#M10058</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2016-09-01T21:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264447#M10059</link>
      <description>&lt;P&gt;You could also script it using:&lt;BR /&gt;
/opt/splunk/bin/splunk show shcluster-status &lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 19:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/264447#M10059</guid>
      <dc:creator>mattlucas719</dc:creator>
      <dc:date>2017-04-11T19:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/510671#M17529</link>
      <description>&lt;P&gt;Heyo! Stumbled across this thread and thought I'd offer up an easier alternative than using the internal or metrics logging, if you've got privileges to hit the REST endpoints.&lt;/P&gt;&lt;P&gt;You can also use this to output the captain info via SPL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /services/shcluster/status splunk_server=local&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which outputs the captain information in the&amp;nbsp;&lt;EM&gt;captain.*&lt;/EM&gt; fields. We use `splunk_server=local` to avoid trying to query other SHC / IDX members for captain info (which will throw errors), since we only need information from the SH we're running it on.&lt;BR /&gt;See:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTcluster#shcluster.2Fstatus" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTcluster#shcluster.2Fstatus&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:16:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/510671#M17529</guid>
      <dc:creator>TheWoodRanger</dc:creator>
      <dc:date>2020-07-23T14:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: What are my options to track the captain switch over time in a search head cluster?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/649005#M27258</link>
      <description>&lt;P&gt;Thanks Burwell,&lt;/P&gt;&lt;P&gt;This is the right solution!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 12:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/What-are-my-options-to-track-the-captain-switch-over-time-in-a/m-p/649005#M27258</guid>
      <dc:creator>hazardoom</dc:creator>
      <dc:date>2023-07-03T12:51:44Z</dc:date>
    </item>
  </channel>
</rss>

