<?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: Why does using bucket span before transaction command give wrong duration in results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85832#M21911</link>
    <description>&lt;P&gt;Thankyou for your response, nick.&lt;/P&gt;

&lt;P&gt;I understand now. The reason I am using bucket _time is that I am summary indexing my data. So I have searches aggregating and working on data from the past hour. These results are further used in the daily and weekly searches. So i need the _time values.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2013 09:02:40 GMT</pubDate>
    <dc:creator>RohiniJindam</dc:creator>
    <dc:date>2013-07-08T09:02:40Z</dc:date>
    <item>
      <title>Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85829#M21908</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype = abc | bucket span=1h _time | transaction user_ip destination_domain maxspan=20s maxpause=2s | stats count  by duration destination_domain  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search renders duration for all fields as "0"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype = abc | transaction user_ip destination_domain maxspan=20s maxpause=2s | stats count  by duration destination_domain  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Whereas the above search gives the correct duration between the events. Any thoughts where I am going wrong?  &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 10:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85829#M21908</guid>
      <dc:creator>RohiniJindam</dc:creator>
      <dc:date>2013-07-05T10:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85830#M21909</link>
      <description>&lt;P&gt;What i checked, Bucket command is making it an interval of 1 hour to latest events to older ones. When you apply transaction it doesn't find the respective end to complete the transaction.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 15:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85830#M21909</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-05T15:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85831#M21910</link>
      <description>&lt;P&gt;the bucket command basically rounds down all _time values to the nearest hour.    The transaction command then calculates duration using the _time values of the events.  Since in your transactions the _time values will all be rounded to the same hour, they will all appear to occur at the exact same time.  Hence the durations will all be zero. &lt;/P&gt;

&lt;P&gt;Plus, given your search, there appears to be no legitimate reason to bucket _time...  You're not using the _time values anywhere except implicitly in transaction, and the only thing it's doing in transaction is bad.    &lt;/P&gt;

&lt;P&gt;If your stats clause at the end was trying to group your transactions by duration, destination_domain, &lt;EM&gt;and&lt;/EM&gt; the hour in which they occurred, then this search would make sense fwiw: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype = abc | transaction user_ip destination_domain maxspan=20s maxpause=2s | bucket span=1h _time | stats count  by duration destination_domain _time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 18:55:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85831#M21910</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-07-05T18:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85832#M21911</link>
      <description>&lt;P&gt;Thankyou for your response, nick.&lt;/P&gt;

&lt;P&gt;I understand now. The reason I am using bucket _time is that I am summary indexing my data. So I have searches aggregating and working on data from the past hour. These results are further used in the daily and weekly searches. So i need the _time values.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 09:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85832#M21911</guid>
      <dc:creator>RohiniJindam</dc:creator>
      <dc:date>2013-07-08T09:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85833#M21912</link>
      <description>&lt;P&gt;OK.  If that &lt;CODE&gt;| stats count  by duration destination_domain&lt;/CODE&gt; is in the search generating the summary rows, then it'll be throwing the _time values away though.   If the stats is in a search against the summary events and you've just simplified the question down, that's kind of a different issue. &lt;/P&gt;

&lt;P&gt;Either way though it sounds like you want a &lt;CODE&gt;| stats count  by duration destination_domain _time&lt;/CODE&gt; in the base search that's generating the summary rows.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 17:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85833#M21912</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-07-08T17:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85834#M21913</link>
      <description>&lt;P&gt;True that. I do need &lt;CODE&gt;| stats count  by duration destination_domain _time&lt;/CODE&gt; in the base search that's generating the summary rows.&lt;BR /&gt;
So if i understand the following search correctly,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype = abc | transaction user_ip destination_domain maxspan=20s maxpause=2s | bucket span=1h _time | stats count by duration destination_domain _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transaction command will render the _time values as those of the first event in the transaction. bucket will round off these values to the nearest hour, right?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 06:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85834#M21913</guid>
      <dc:creator>RohiniJindam</dc:creator>
      <dc:date>2013-07-09T06:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85835#M21914</link>
      <description>&lt;P&gt;You got it.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 08:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85835#M21914</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-07-09T08:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using bucket span before transaction command give wrong duration in results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85836#M21915</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 08:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-bucket-span-before-transaction-command-give-wrong/m-p/85836#M21915</guid>
      <dc:creator>RohiniJindam</dc:creator>
      <dc:date>2013-07-09T08:31:33Z</dc:date>
    </item>
  </channel>
</rss>

