<?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 Re: How to count the number of times Splunk is restarted. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146729#M40986</link>
    <description>&lt;P&gt;if you ok for answer, you can vote up or accept answer.&lt;BR /&gt;
to see  where it counts the event only if there is a gap, say 2 mins between them. &lt;BR /&gt;
see what Mr jeffland: doing down in comment.&lt;BR /&gt;
and you can add &lt;CODE&gt;by _time&lt;/CODE&gt; in stats to more see.&lt;BR /&gt;
ex: &lt;CODE&gt;index="_audit" action="restart_splunkd" | bucket _time span=2m | dedup _time | stats count as "number of times Splunkd is restarted" by _time&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;thank. Mr kamal_jagga &lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2015 08:13:38 GMT</pubDate>
    <dc:creator>fdi01</dc:creator>
    <dc:date>2015-06-11T08:13:38Z</dc:date>
    <item>
      <title>How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146718#M40975</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to create a metrics of Count of the following things.&lt;BR /&gt;
 1.  Splunk restarts done from UI.&lt;BR /&gt;
 2. Splunkd restarts done.&lt;BR /&gt;
 3. Splunk Forwarder restarts.&lt;/P&gt;

&lt;P&gt;Kindly advise.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146718#M40975</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2015-06-09T19:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146719#M40976</link>
      <description>&lt;P&gt;Also, how to find out the metrics for search head restarts.&lt;/P&gt;

&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146719#M40976</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2015-06-09T22:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146720#M40977</link>
      <description>&lt;P&gt;Have a look in the audit index, &lt;CODE&gt;index="_audit"&lt;/CODE&gt; and look at the action field&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 07:34:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146720#M40977</guid>
      <dc:creator>MichaelPriest</dc:creator>
      <dc:date>2015-06-10T07:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146721#M40978</link>
      <description>&lt;P&gt;you seeing many action=restart_splunkd messages from your "_audit" index .&lt;/P&gt;

&lt;P&gt;try like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_audit" host="host_you_want" | stats count(eval(action="restart_splunkd")) as "number of times Splunkd is restarted"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146721#M40978</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2020-09-28T20:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146722#M40979</link>
      <description>&lt;P&gt;to see if splunk is up, I look at the events &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*splunkd.log*  "(build"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but sometimes, you can see 2 close events for a single restart. So if you want the exact count you can add add a bucket per minute  and dedup.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 11:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146722#M40979</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2015-06-10T11:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146723#M40980</link>
      <description>&lt;P&gt;Thanks it provided me the count.&lt;BR /&gt;
But i found that there are multiple entries for the same restart with gap of milliseconds.&lt;BR /&gt;
Query :index="_audit"  action="restart_splunkd"&lt;/P&gt;

&lt;P&gt;Is it possible that we can put some filter/condition where it counts the event only if there is a gap, say 2 mins between them. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146723#M40980</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2020-09-28T20:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146724#M40981</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;How can i add a bucket of a min or 2 and dedup.&lt;/P&gt;

&lt;P&gt;Would you be able to give the exact query string.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 20:53:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146724#M40981</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2015-06-10T20:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146725#M40982</link>
      <description>&lt;P&gt;Also, when i see the results of the following query.&lt;/P&gt;

&lt;P&gt;index=_internal splunkd.log "&lt;EM&gt;start&lt;/EM&gt;"&lt;/P&gt;

&lt;P&gt;I see 2 source types.&lt;BR /&gt;
sourcetype=splunkd_remote_searches&lt;BR /&gt;
and other &lt;BR /&gt;
sourcetype=splunkd coming from splunkforwarder.&lt;/P&gt;

&lt;P&gt;is this the standard format.&lt;BR /&gt;
And which one is for the splunkd.&lt;/P&gt;

&lt;P&gt;And also want to know how to find out the splunk restarts done from Splunk UI. (I just not restarted splunk from UI and don't see that in the above mentioned splunkd restarts)&lt;/P&gt;

&lt;P&gt;Kindly advise.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146725#M40982</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2020-09-28T20:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146726#M40983</link>
      <description>&lt;P&gt;Also,&lt;BR /&gt;
When i used your query, i found some extra events also. So, i modified it to the below one.&lt;/P&gt;

&lt;P&gt;index=_internal source=&lt;EM&gt;splunkd.log&lt;/EM&gt;  "Splunkd starting (build 245427)."&lt;/P&gt;

&lt;P&gt;Now, would you be able to suggest how to count the number of events that come from this search.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 21:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146726#M40983</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2015-06-10T21:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146727#M40984</link>
      <description>&lt;P&gt;That's exactly what yannK suggested - bucketing time and deduping. Going from the above search, that would be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_audit" action="restart_splunkd" | bucket _time span=2m | dedup _time | stats count as "number of times Splunkd is restarted"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(Or you leave action="restart_splunkd" in &lt;CODE&gt;stats count&lt;/CODE&gt;, however you prefer it - although this should be faster)&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 06:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146727#M40984</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-06-11T06:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146728#M40985</link>
      <description>&lt;P&gt;index=_internal source=&lt;EM&gt;splunkd.log&lt;/EM&gt;  "(build"| timechart span=1m values(_raw) as Event&lt;/P&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;P&gt;index=_internal source=&lt;EM&gt;splunkd.log&lt;/EM&gt;  "(build"| dedup _raw|table _raw,_time&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146728#M40985</guid>
      <dc:creator>splunker12er</dc:creator>
      <dc:date>2020-09-28T20:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146729#M40986</link>
      <description>&lt;P&gt;if you ok for answer, you can vote up or accept answer.&lt;BR /&gt;
to see  where it counts the event only if there is a gap, say 2 mins between them. &lt;BR /&gt;
see what Mr jeffland: doing down in comment.&lt;BR /&gt;
and you can add &lt;CODE&gt;by _time&lt;/CODE&gt; in stats to more see.&lt;BR /&gt;
ex: &lt;CODE&gt;index="_audit" action="restart_splunkd" | bucket _time span=2m | dedup _time | stats count as "number of times Splunkd is restarted" by _time&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;thank. Mr kamal_jagga &lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 08:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146729#M40986</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-06-11T08:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146730#M40987</link>
      <description>&lt;P&gt;This search does not return valid results for me, the one from yannk it does &lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 09:28:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146730#M40987</guid>
      <dc:creator>dsmc_adv</dc:creator>
      <dc:date>2016-05-11T09:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of times Splunk is restarted.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146731#M40988</link>
      <description>&lt;P&gt;I downvoted this post because it doesn't return all the values&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 09:28:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-times-Splunk-is-restarted/m-p/146731#M40988</guid>
      <dc:creator>dsmc_adv</dc:creator>
      <dc:date>2016-05-11T09:28:53Z</dc:date>
    </item>
  </channel>
</rss>

