<?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 How does splunk decide Time Interval for Time range Picker in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-decide-Time-Interval-for-Time-range-Picker/m-p/23726#M4264</link>
    <description>&lt;P&gt;How does splunk decide time interval for Time Range selected in Time Range Picker.&lt;BR /&gt;
For Ex- When we select "Last 7 Days" from time range picker and see the graph, the time interval is automatically done to 1 Day!&lt;BR /&gt;
when we select "Last 24 hours" time interval automatically done to 4 hours!&lt;BR /&gt;
How does Splunk decide this interval?&lt;BR /&gt;
Please help me!&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2011 06:01:15 GMT</pubDate>
    <dc:creator>tkadale</dc:creator>
    <dc:date>2011-06-07T06:01:15Z</dc:date>
    <item>
      <title>How does splunk decide Time Interval for Time range Picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-decide-Time-Interval-for-Time-range-Picker/m-p/23726#M4264</link>
      <description>&lt;P&gt;How does splunk decide time interval for Time Range selected in Time Range Picker.&lt;BR /&gt;
For Ex- When we select "Last 7 Days" from time range picker and see the graph, the time interval is automatically done to 1 Day!&lt;BR /&gt;
when we select "Last 24 hours" time interval automatically done to 4 hours!&lt;BR /&gt;
How does Splunk decide this interval?&lt;BR /&gt;
Please help me!&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 06:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-decide-Time-Interval-for-Time-range-Picker/m-p/23726#M4264</guid>
      <dc:creator>tkadale</dc:creator>
      <dc:date>2011-06-07T06:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How does splunk decide Time Interval for Time range Picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-decide-Time-Interval-for-Time-range-Picker/m-p/23727#M4265</link>
      <description>&lt;P&gt;The answer depends on what 'graph' you're referring to.   &lt;/P&gt;

&lt;P&gt;1) If you mean the graph in the default search view that always has green bars,  we call that the 'timeline' generally.  What determines the granularity there is the status_buckets argument that is sent when the search is first dispatched.   The presence of the FlashTimeline module in the XML hierarchy will cause status_buckets to be set to 300. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/Developer/RESTSearch#POST" target="_blank"&gt;http://www.splunk.com/base/Documentation/latest/Developer/RESTSearch#POST&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It's also a little-known fact that the FlashTimeline module exposes a &lt;CODE&gt;statusBuckets&lt;/CODE&gt; param in the XML that you can use to change this from the default of 300. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/Developer/ModuleReference#FlashTimeline" target="_blank"&gt;http://www.splunk.com/base/Documentation/latest/Developer/ModuleReference#FlashTimeline&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2) On the other hand if you mean the timecharts that you get when you're using the &lt;CODE&gt;timechart&lt;/CODE&gt; command,  then the default granularity comes from the &lt;CODE&gt;timechart&lt;/CODE&gt; command itself. &lt;/P&gt;

&lt;P&gt;Timechart accepts a &lt;CODE&gt;bins&lt;/CODE&gt; argument OR a &lt;CODE&gt;span&lt;/CODE&gt; argument. Of the two, people are generally more familiar with the &lt;CODE&gt;span&lt;/CODE&gt; arg, because its more intuitive to say &lt;CODE&gt;span=2h&lt;/CODE&gt; than &lt;CODE&gt;bins=200&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;However if you specify neither one of those two, the &lt;CODE&gt;timechart&lt;/CODE&gt; command will use an implicit default for the &lt;CODE&gt;bins&lt;/CODE&gt; param. &lt;/P&gt;

&lt;P&gt;The documentation says that the default bins value is &lt;CODE&gt;bins=300&lt;/CODE&gt; but based on my observation I think this is incorrect and it's closer to 150.  You can test this out by running various searches with &lt;CODE&gt;timechart count&lt;/CODE&gt; and then with &lt;CODE&gt;timechart bins=300 count&lt;/CODE&gt;,  and in some timeranges you'll see a difference. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Timechart" target="_blank"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Timechart&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;by the way, you should be aware that when you're using a 'split by' field in &lt;CODE&gt;timechart&lt;/CODE&gt;, make sure to put the &lt;CODE&gt;bins&lt;/CODE&gt; and &lt;CODE&gt;span&lt;/CODE&gt; args right after the &lt;CODE&gt;timechart&lt;/CODE&gt; and not after your split by field.    Because if you put these args after the split by field,  that tells Splunk that you want to control bucketing on the splitBy field, not on the time axis....    Try it and see because it's kind of cool.  Run &lt;CODE&gt;timechart count by date_minute bins=10&lt;/CODE&gt;  and &lt;CODE&gt;timechart count by date_minute span=15&lt;/CODE&gt; to see what I mean.  &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-decide-Time-Interval-for-Time-range-Picker/m-p/23727#M4265</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2020-09-28T09:39:07Z</dc:date>
    </item>
  </channel>
</rss>

