<?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 I have to aggregate events in index by week and by month. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450448#M168293</link>
    <description>&lt;P&gt;I have tried using bin command but as &lt;BR /&gt;
index=test|  bin span=1w _time | chart count as total_count by _time, action&lt;/P&gt;

&lt;P&gt;But this gives me event count over a span of 30days for every 7 days.&lt;/P&gt;

&lt;P&gt;Please help me understand how to aggregate events in index by week and by month. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:32:35 GMT</pubDate>
    <dc:creator>snigdhasaxena</dc:creator>
    <dc:date>2020-09-29T20:32:35Z</dc:date>
    <item>
      <title>I have to aggregate events in index by week and by month.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450448#M168293</link>
      <description>&lt;P&gt;I have tried using bin command but as &lt;BR /&gt;
index=test|  bin span=1w _time | chart count as total_count by _time, action&lt;/P&gt;

&lt;P&gt;But this gives me event count over a span of 30days for every 7 days.&lt;/P&gt;

&lt;P&gt;Please help me understand how to aggregate events in index by week and by month. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:32:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450448#M168293</guid>
      <dc:creator>snigdhasaxena</dc:creator>
      <dc:date>2020-09-29T20:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: I have to aggregate events in index by week and by month.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450449#M168294</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;try this out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index = test
    | bin _time span=1w as week
    | bin span=1mon _time as month
    | stats count as total_count by week month action
    | eval week_human = strftime(week, "%Y-%U")
    | eval month_human = strftime(month, "%Y-%B")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450449#M168294</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-07-18T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: I have to aggregate events in index by week and by month.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450450#M168295</link>
      <description>&lt;P&gt;It may be painful to do this on the raw data if you need to do this all the time, over and over.  If you do, this is the kind of thing where a &lt;CODE&gt;Summary Index&lt;/CODE&gt; is useful;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Configuresummaryindexes"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Configuresummaryindexes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you aggregate daily, then it becomes trivial to mine it out by week or by month from your daily aggregation/summary.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:18:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-to-aggregate-events-in-index-by-week-and-by-month/m-p/450450#M168295</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-18T13:18:57Z</dc:date>
    </item>
  </channel>
</rss>

