<?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: Stats per hour? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280346#M84611</link>
    <description>&lt;P&gt;You did the bucketing for 1hr for _time but didn't use it in your stats. Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;base search&amp;gt; (EventCode=XXXX) | eval login_account=mvindex(Account_Name,1) | bucket _time span=1h | stats count by _time login_account | where count&amp;gt;3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 12 Feb 2016 17:12:43 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-02-12T17:12:43Z</dc:date>
    <item>
      <title>Stats per hour?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280345#M84610</link>
      <description>&lt;P&gt;So, I was looking at this:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/205556/how-to-set-up-an-alert-if-the-same-error-occurs-mo.html"&gt;https://answers.splunk.com/answers/205556/how-to-set-up-an-alert-if-the-same-error-occurs-mo.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Started with that to set up a report showing number of users with more than nnnn events per hour.&lt;/P&gt;

&lt;P&gt;I though this query would give me per hour stats, for users with more than 3 events in the respective hour:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; (EventCode=XXXX) | eval login_account=mvindex(Account_Name,1) | bucket _time span=1h | stats count by login_account | where count&amp;gt;3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Instead, I only get a total count for the whole query time period (24hrs in this case), and a listing of users with count&amp;gt;3 for those 24 hrs.&lt;/P&gt;

&lt;P&gt;What have I not understood here?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 15:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280345#M84610</guid>
      <dc:creator>reedmohn</dc:creator>
      <dc:date>2016-02-12T15:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stats per hour?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280346#M84611</link>
      <description>&lt;P&gt;You did the bucketing for 1hr for _time but didn't use it in your stats. Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;base search&amp;gt; (EventCode=XXXX) | eval login_account=mvindex(Account_Name,1) | bucket _time span=1h | stats count by _time login_account | where count&amp;gt;3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Feb 2016 17:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280346#M84611</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-12T17:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Stats per hour?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280347#M84612</link>
      <description>&lt;P&gt;Thanks, that's a lot better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 08:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-per-hour/m-p/280347#M84612</guid>
      <dc:creator>reedmohn</dc:creator>
      <dc:date>2016-02-15T08:49:49Z</dc:date>
    </item>
  </channel>
</rss>

