<?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: bucket span not working for lower time span in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508539#M2550</link>
    <description>&lt;P&gt;sample: try&amp;nbsp;&lt;EM&gt;time picker last 7 days&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults [| makeresults  | addinfo | eval count="count=".round(info_max_time - info_min_time) | return $count] | streamstats current=f count | eval _time=_time - count | fields - count
| append [ | tstats count where index=_internal sourcetype=splunkd by _time span=1s]
| fillnull count
| stats max(count) as count by _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;make &lt;STRONG&gt;_time&lt;/STRONG&gt; like above. If subsearch result is over 50000,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal by _time span=1s
| reverse
| autoregress _time as time
| reverse
| eval time_ex=mvrange(_time,time,1)
| streamstats count as session
| stats values(count) as count by session time_ex
| sort 0 session time
| rename time_ex as _time
| eventstats min(_time) as time by session
| eval count=if(_time=time,count,0)
| fields - session time&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 10 Jul 2020 20:06:38 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-07-10T20:06:38Z</dc:date>
    <item>
      <title>bucket span not working for lower time span</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508462#M2539</link>
      <description>&lt;P&gt;Hi, I have a search but it doesn't seem to work. I need to extract the transaction per second data and for that I was using timechart but it is restricting the rows with below error -&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The specified span would result in too many (&amp;gt;50000) rows.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then i thought of using bucket command with stats but it doesn't seem to work correctly. It doesn't give me the data per second which is actually my requirement. See the below table for output&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype=ssl_access_combined requested_content="/myapp" 
| bucket span=1s _time 
| stats count by _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_time	count
2020-07-09 00:00:06	1
2020-07-09 00:00:27	1
2020-07-09 00:00:38	1
2020-07-09 00:00:40	1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can someone advice on this? I am not sure why it is happening.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 11:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508462#M2539</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2020-07-10T11:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: bucket span not working for lower time span</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508471#M2542</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;your syntax/usage with bucket seems to be correct.&lt;/P&gt;&lt;P&gt;For how long time range you try to run this query with timechart?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508471#M2542</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-10T12:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: bucket span not working for lower time span</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508474#M2543</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;I actually needed for longer time like last 7 days which won't work with timechart.&lt;/P&gt;&lt;P&gt;Actually I think i got what's wrong. I was confused about the time gap in the below table but it seems the stats command is only logging the time when there was an event occurred. I was expecting it to work like timechart which shows the every second irrespective of the events occurred&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_time	count
2020-07-09 00:00:06	1
2020-07-09 00:00:27	1
2020-07-09 00:00:38	1
2020-07-09 00:00:40	1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508474#M2543</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2020-07-10T12:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: bucket span not working for lower time span</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508481#M2545</link>
      <description>&lt;P&gt;Actually bucket/bin command groups events within 1s slots based on their _time and if there haven’t been any events in some particular seconds then stats couldn’t calculate for it anything.&lt;/P&gt;&lt;P&gt;Maybe those gaps can filled with makeresults and streamstats? Unfortunately I haven’t splunk on my hand now to test this further.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 13:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508481#M2545</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-10T13:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: bucket span not working for lower time span</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508539#M2550</link>
      <description>&lt;P&gt;sample: try&amp;nbsp;&lt;EM&gt;time picker last 7 days&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults [| makeresults  | addinfo | eval count="count=".round(info_max_time - info_min_time) | return $count] | streamstats current=f count | eval _time=_time - count | fields - count
| append [ | tstats count where index=_internal sourcetype=splunkd by _time span=1s]
| fillnull count
| stats max(count) as count by _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;make &lt;STRONG&gt;_time&lt;/STRONG&gt; like above. If subsearch result is over 50000,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal by _time span=1s
| reverse
| autoregress _time as time
| reverse
| eval time_ex=mvrange(_time,time,1)
| streamstats count as session
| stats values(count) as count by session time_ex
| sort 0 session time
| rename time_ex as _time
| eventstats min(_time) as time by session
| eval count=if(_time=time,count,0)
| fields - session time&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Jul 2020 20:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/bucket-span-not-working-for-lower-time-span/m-p/508539#M2550</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-10T20:06:38Z</dc:date>
    </item>
  </channel>
</rss>

