<?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: timechart bug? (placement of 'span' in the search bar) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150476#M42165</link>
    <description>&lt;P&gt;The answer is that the &lt;CODE&gt;span&lt;/CODE&gt; argument has two completely different meanings in those two locations.   I agree that timechart should give some messaging around this though.   The docs also seem to be wrong here.  Currently the docs list "span" as two different args, in the two different sections.  But the description in both places describes only the more common usage. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Timechart"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Timechart&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Run these two searches and note the differences. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | timechart span=10 count by kb
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is more normal, and timechart has interpreted our "10" to mean "10 seconds" &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | timechart count by kb span=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You almost never see this but it's been a part of timechart since the beginning. This tells timechart to bucket the "kb" values on the fly into buckets of size "10".   The key is that the "span" keyword follows a numerical split-by field. &lt;/P&gt;

&lt;P&gt;Try it out. &lt;/P&gt;

&lt;P&gt;UPDATE: actually I was misreading the docs. They don't seem to refer to the second type of "span" argument at all.    &lt;/P&gt;

&lt;P&gt;Also, the &lt;CODE&gt;chart&lt;/CODE&gt; command does this too, and you can do it separately for both fields.   try this one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | chart count over kb span=10 by eps span=5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Apr 2015 18:24:19 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2015-04-17T18:24:19Z</dc:date>
    <item>
      <title>timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150473#M42162</link>
      <description>&lt;P&gt;One of my users is having an issue with timechart ...&lt;/P&gt;

&lt;P&gt;(host=aaa6* OR host=bbb24*) "[string to filter search]" (E=005 OR E=00D OR E=0Bb OR E=0Bz) | timechart span=12h count by E&lt;/P&gt;

&lt;P&gt;The output of this search gives me a table with the following five field headers AND the _time field is correctly broken down into 12 hour increments&lt;/P&gt;

&lt;P&gt;_time, 005, 00D, 0Bb, 0Bz&lt;/P&gt;

&lt;P&gt;(host=aaa6* OR host=bbb24*) "[string to filter search]" (E=005 OR E=00D OR E=0Bb OR E=0Bz) | timechart count by E span=12h&lt;/P&gt;

&lt;P&gt;This search gives me the following five field headers AND the _time field is broken down into 30 minute increments&lt;/P&gt;

&lt;P&gt;_time, 0, 00D, 0Bb, 0Bz&lt;/P&gt;

&lt;P&gt;The timechart documentation does not appear to suggest that the placement of 'span' is required directly after 'timechart', but it appears to be so.&lt;/P&gt;

&lt;P&gt;Is this worth filing a bug?&lt;/P&gt;

&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150473#M42162</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2015-04-17T15:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150474#M42163</link>
      <description>&lt;P&gt;Hi pkeller&lt;BR /&gt;
Note that in splunk web requests are executed in sequential manner&lt;BR /&gt;
Then when you write the first request below , the attribut span=12h is considered before the action is executed&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    (host=aaa6* OR host=bbb24*) "[string to filter search]" (E=005 OR E=00D OR E=0Bb OR E=0Bz) | timechart span=12h count by E
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;while with this other request the action is executed before the attribut span=12h is considered&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host=aaa6* OR host=bbb24*) "[string to filter search]" (E=005 OR E=00D OR E=0Bb OR E=0Bz) | timechart count by E span=12h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think that the first request is the best .I advise you to work with it.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 16:09:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150474#M42163</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-17T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150475#M42164</link>
      <description>&lt;P&gt;Perfectly stated. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 16:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150475#M42164</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2015-04-17T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150476#M42165</link>
      <description>&lt;P&gt;The answer is that the &lt;CODE&gt;span&lt;/CODE&gt; argument has two completely different meanings in those two locations.   I agree that timechart should give some messaging around this though.   The docs also seem to be wrong here.  Currently the docs list "span" as two different args, in the two different sections.  But the description in both places describes only the more common usage. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Timechart"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Timechart&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Run these two searches and note the differences. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | timechart span=10 count by kb
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is more normal, and timechart has interpreted our "10" to mean "10 seconds" &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | timechart count by kb span=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You almost never see this but it's been a part of timechart since the beginning. This tells timechart to bucket the "kb" values on the fly into buckets of size "10".   The key is that the "span" keyword follows a numerical split-by field. &lt;/P&gt;

&lt;P&gt;Try it out. &lt;/P&gt;

&lt;P&gt;UPDATE: actually I was misreading the docs. They don't seem to refer to the second type of "span" argument at all.    &lt;/P&gt;

&lt;P&gt;Also, the &lt;CODE&gt;chart&lt;/CODE&gt; command does this too, and you can do it separately for both fields.   try this one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1000 | chart count over kb span=10 by eps span=5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Apr 2015 18:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150476#M42165</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-04-17T18:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150477#M42166</link>
      <description>&lt;P&gt;Command arguments are not parsed sequentially. Instead the reason for the difference is that the &lt;CODE&gt;span&lt;/CODE&gt; argument has two different meanings in the two different places. See my answer here. &lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 18:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150477#M42166</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2015-04-17T18:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150478#M42167</link>
      <description>&lt;P&gt;Thank you you.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 19:52:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150478#M42167</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2015-04-17T19:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: timechart bug? (placement of 'span' in the search bar)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150479#M42168</link>
      <description>&lt;P&gt;Why on earth is it not documented? Some hidden feature? Not knowing I did the second sort of span and I was freaking out because the time span would not change! Thanks a lot for the explanation!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 13:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-bug-placement-of-span-in-the-search-bar/m-p/150479#M42168</guid>
      <dc:creator>Muryoutaisuu</dc:creator>
      <dc:date>2015-04-27T13:19:58Z</dc:date>
    </item>
  </channel>
</rss>

