<?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: statistic by week days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50523#M12136</link>
    <description>&lt;P&gt;In that case you can use the join command with sub searches:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
sourcetype="Your Sourcetype" earliest=@w1-2w+9h latest=@w1-2w+10h | chart count as "Two Weeks Ago" by Operation | join Type=outer [search sourcetype="Your Sourcetype" earliest=@w1-1w+9h latest=@w1-1w+10h | chart count as "One Week Ago" by Operation] | join Type=outer [search sourcetype="Your Sourcetype" earliest=@w1+9h latest=@w1+10h | chart count as "This Week" by Operation] | whatever stats you'd like to do to your results&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;@w1 is Monday,&lt;BR /&gt;
1w is 1 week,&lt;BR /&gt;
2w is 2 weeks,&lt;BR /&gt;
etc...&lt;/P&gt;

&lt;P&gt;If you want to run this every hour as an alert, just get rid of the +9h and +10h time modifiers and set the search to run on an hourly basis and send a mail.&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2013 09:39:37 GMT</pubDate>
    <dc:creator>watsm10</dc:creator>
    <dc:date>2013-05-30T09:39:37Z</dc:date>
    <item>
      <title>statistic by week days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50521#M12134</link>
      <description>&lt;P&gt;How do I get an average count of operations during current minute using last 3 weeks, for example?&lt;BR /&gt;
I need to know how to get the distribution of number of operations during the time of day (every minute, or five minutes, for example)&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 08:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50521#M12134</guid>
      <dc:creator>0range</dc:creator>
      <dc:date>2013-05-30T08:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: statistic by week days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50522#M12135</link>
      <description>&lt;P&gt;I need to put the events happened at 9-00 this monday together with the events happenned at 9-00 on monday a week ago, and also two weeks ago. And I want to do this for each time interval.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 09:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50522#M12135</guid>
      <dc:creator>0range</dc:creator>
      <dc:date>2013-05-30T09:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: statistic by week days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50523#M12136</link>
      <description>&lt;P&gt;In that case you can use the join command with sub searches:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
sourcetype="Your Sourcetype" earliest=@w1-2w+9h latest=@w1-2w+10h | chart count as "Two Weeks Ago" by Operation | join Type=outer [search sourcetype="Your Sourcetype" earliest=@w1-1w+9h latest=@w1-1w+10h | chart count as "One Week Ago" by Operation] | join Type=outer [search sourcetype="Your Sourcetype" earliest=@w1+9h latest=@w1+10h | chart count as "This Week" by Operation] | whatever stats you'd like to do to your results&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;@w1 is Monday,&lt;BR /&gt;
1w is 1 week,&lt;BR /&gt;
2w is 2 weeks,&lt;BR /&gt;
etc...&lt;/P&gt;

&lt;P&gt;If you want to run this every hour as an alert, just get rid of the +9h and +10h time modifiers and set the search to run on an hourly basis and send a mail.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 09:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50523#M12136</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2013-05-30T09:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: statistic by week days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50524#M12137</link>
      <description>&lt;P&gt;thank you&lt;/P&gt;

&lt;P&gt;I think I really need something like this:&lt;/P&gt;

&lt;P&gt;sourcetype=MySource operation=MyOp &lt;BR /&gt;
earliest = -15m@m latest = -0m@m | &lt;BR /&gt;
rex " (?P&lt;HHMM&gt;\d\d:\d\d)" | &lt;BR /&gt;
chart count as "0wAgo" by hhmm | &lt;BR /&gt;
join type=inner hhmm &lt;BR /&gt;
 [search &lt;BR /&gt;
  sourcetype=MySource operation=MyOp&lt;BR /&gt;
  earliest = -1w@m-15m@m latest = -1w@m |&lt;BR /&gt;
  rex " (?P&lt;HHMM&gt;\d\d:\d\d)" |&lt;BR /&gt;
  chart count as "1wAgo" by hhmm |&lt;BR /&gt;
  join type=inner hhmm &lt;BR /&gt;
   [search &lt;BR /&gt;
    sourcetype=MySource operation=MyOp &lt;BR /&gt;
    earliest = -2w@m-15m@m latest = -2w@m | &lt;BR /&gt;
    rex " (?P&lt;HHMM&gt;\d\d:\d\d)" |&lt;BR /&gt;
    chart count as "2wAgo" by hhmm&lt;BR /&gt;
   ]&lt;BR /&gt;
 ]&lt;/HHMM&gt;&lt;/HHMM&gt;&lt;/HHMM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 11:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50524#M12137</guid>
      <dc:creator>0range</dc:creator>
      <dc:date>2013-05-30T11:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: statistic by week days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50525#M12138</link>
      <description>&lt;P&gt;you could use the in-built _time field instead of extracting the time field using regex. So...&lt;/P&gt;

&lt;P&gt;....| chart count as "1wAgo" by _time |&lt;BR /&gt;
  join type=inner _time&lt;BR /&gt;
   [search.....&lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;you could use the timechart command instead of chart.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2013 13:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/statistic-by-week-days/m-p/50525#M12138</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2013-05-30T13:51:04Z</dc:date>
    </item>
  </channel>
</rss>

