<?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 snap span with bucket in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62780#M15496</link>
    <description>&lt;P&gt;relative_time() - Works perfect! Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 30 May 2012 14:25:00 GMT</pubDate>
    <dc:creator>aarcro</dc:creator>
    <dc:date>2012-05-30T14:25:00Z</dc:date>
    <item>
      <title>How to snap span with bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62778#M15494</link>
      <description>&lt;P&gt;So I want use bucket to group my data by weeks that start on Mondays if I change my query to use &lt;CODE&gt;earliest=-1w@w1 latest=@w1&lt;/CODE&gt; Then &lt;CODE&gt;bucket span=week&lt;/CODE&gt; does the right thing. But I'm going to be running a daily (or hourly) summary index, that I want to bucket by weeks including the current week in progress.&lt;/P&gt;

&lt;P&gt;Index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="source" | bucket _time span=day | stats count by severity, customer, _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search that works for daily counts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search severity &amp;gt; 9 customer="name" | eval Day=strftime(_time, "%Y-%m-%d")|  eval n="count" | xyseries Day, n, count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need a search that works for weekly counts snapped to mondays.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 21:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62778#M15494</guid>
      <dc:creator>aarcro</dc:creator>
      <dc:date>2012-05-29T21:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to snap span with bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62779#M15495</link>
      <description>&lt;P&gt;How does this work for you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search severity &amp;gt; 9 customer="name" | 
eval Week=relative_time(_time, "@w1") |  
eval n="count" | 
xyseries Week, n, count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 May 2012 08:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62779#M15495</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-05-30T08:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to snap span with bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62780#M15496</link>
      <description>&lt;P&gt;relative_time() - Works perfect! Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62780#M15496</guid>
      <dc:creator>aarcro</dc:creator>
      <dc:date>2012-05-30T14:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to snap span with bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62781#M15497</link>
      <description>&lt;P&gt;Actually need to run through stats again to sum(count) by Week&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62781#M15497</guid>
      <dc:creator>aarcro</dc:creator>
      <dc:date>2012-05-30T14:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to snap span with bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62782#M15498</link>
      <description>&lt;P&gt;search severity &amp;gt; 9 customer="name" | &lt;BR /&gt;
eval Week=relative_time(_time, "@w1") |&lt;BR /&gt;&lt;BR /&gt;
stats count by severity customer Week |&lt;BR /&gt;
eval n="count" | &lt;BR /&gt;
xyseries Week, n, count&lt;/P&gt;

&lt;P&gt;though I am unclear on why you want count by severity and customer as well as by week...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-snap-span-with-bucket/m-p/62782#M15498</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T11:53:30Z</dc:date>
    </item>
  </channel>
</rss>

