<?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: Search command: bucket in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14844#M1672</link>
    <description>&lt;P&gt;Oh nice. Yea that's probably it then. Interestingly enough this isnt supposed to be an issue - the distributed search code actually sends serialized timezone info over the wire specifically so that the bucketing should be performed consistently... Sounds like its worth a bug + support case..&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2010 10:30:31 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2010-06-04T10:30:31Z</dc:date>
    <item>
      <title>Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14837#M1665</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;

&lt;P&gt;We have a summary indexed search that puts events into buckets for a day. We then use that to get the top 5 values for a given day.  This is the search we have:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket span=1d _time | sitop 5 field1 by _time  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What we notice is that there are two buckets created within a single day. One has a &lt;CODE&gt;12:00 AM&lt;/CODE&gt; value and the other has a &lt;CODE&gt;5:00 PM&lt;/CODE&gt; value. We just need all of the events to be grouped under one value. A sample result is given below.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                       field1  count   percent  
5/28/10 12:00:00.000 AM value1  3406    26.442046  
5/28/10 12:00:00.000 AM value2  2506    19.455011
5/28/10 12:00:00.000 AM value3  1034    8.027327
5/28/10 12:00:00.000 AM value4  617 4.790001
5/28/10 12:00:00.000 AM value5  609 4.727894
5/28/10 5:00:00.000 PM  value6  61  21.478873
5/28/10 5:00:00.000 PM  value7  39  13.732394
5/28/10 5:00:00.000 PM  value8  33  11.619718
5/28/10 5:00:00.000 PM  value9  25  8.802817
5/28/10 5:00:00.000 PM  value10 21  7.394366
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Are we missing something? Thanks for your help.  &lt;/P&gt;

&lt;P&gt;Ranga&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 00:23:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14837#M1665</guid>
      <dc:creator>sranga</dc:creator>
      <dc:date>2010-06-04T00:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14838#M1666</link>
      <description>&lt;P&gt;interesting. The only thing i can think of is that you're using distributed search and maybe not all servers are in the same timezone?  Since the bucketing logic will (i think) be applied on the remote peer, it would calculate the day boundaries differently, and then the central search-head would get back all the buckets and apply its day boundaries and you might end up with weird results like this.. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 00:45:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14838#M1666</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-06-04T00:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14839#M1667</link>
      <description>&lt;P&gt;Thanks. Is there anyway to check if distributed search is used or should I contact the admin to get this information? If a distributed search is used, can we prevent it through a configuration or command?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 00:54:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14839#M1667</guid>
      <dc:creator>sranga</dc:creator>
      <dc:date>2010-06-04T00:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14840#M1668</link>
      <description>&lt;P&gt;You can use &lt;CODE&gt;localop&lt;/CODE&gt; to "prevent subsequent commands from being executed on remote peers."  Not sure if that's your issue or not, but I guess this could help you find out.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 01:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14840#M1668</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-04T01:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14841#M1669</link>
      <description>&lt;P&gt;Side note:  It doesn't look like your limit (5) is honored when you are using &lt;CODE&gt;sitop&lt;/CODE&gt; instead of &lt;CODE&gt;top&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 01:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14841#M1669</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-04T01:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14842#M1670</link>
      <description>&lt;P&gt;Well if you havent set up splunk on any other machine and set up searches to distribute between the N machines, then there's no distributed search.  in which case my idea will be a red herring.  But to check you would go into "Manager &amp;gt; Distributed Search &amp;gt; Search Peers"  and see if there are any peered servers.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 02:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14842#M1670</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-06-04T02:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14843#M1671</link>
      <description>&lt;P&gt;Thanks. We do have a distributed search setup and there is a timezone mismatch between the two servers. This is most likely causing the issue we are seeing.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 03:49:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14843#M1671</guid>
      <dc:creator>sranga</dc:creator>
      <dc:date>2010-06-04T03:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14844#M1672</link>
      <description>&lt;P&gt;Oh nice. Yea that's probably it then. Interestingly enough this isnt supposed to be an issue - the distributed search code actually sends serialized timezone info over the wire specifically so that the bucketing should be performed consistently... Sounds like its worth a bug + support case..&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 10:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14844#M1672</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-06-04T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search command: bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14845#M1673</link>
      <description>&lt;P&gt;This is a bug.  The best workaround right now would be to insert the localop command before the bucket, as lowell suggested.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2010 10:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-command-bucket/m-p/14845#M1673</guid>
      <dc:creator>steveyz</dc:creator>
      <dc:date>2010-06-04T10:55:07Z</dc:date>
    </item>
  </channel>
</rss>

