<?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: Can I search specific buckets? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9937#M314</link>
    <description>&lt;P&gt;Answered my own question...&lt;/P&gt;

&lt;P&gt;Just go to $SPLUNK_HOME/var/lib/splunk/&amp;lt;index&amp;gt;/db/&amp;lt;bucket&amp;gt; and view the Hosts.data file&lt;/P&gt;</description>
    <pubDate>Wed, 03 Mar 2010 02:19:20 GMT</pubDate>
    <dc:creator>oreoshake</dc:creator>
    <dc:date>2010-03-03T02:19:20Z</dc:date>
    <item>
      <title>Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9936#M313</link>
      <description>&lt;P&gt;We are having bucket performance issues and it looks like the cause is a host that is sending data "from the past" consistently.  I know which bucket is causing the issue so is it possible to search by bucket?&lt;/P&gt;

&lt;P&gt;search bucket=hot_v1_431&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2010 02:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9936#M313</guid>
      <dc:creator>oreoshake</dc:creator>
      <dc:date>2010-03-03T02:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9937#M314</link>
      <description>&lt;P&gt;Answered my own question...&lt;/P&gt;

&lt;P&gt;Just go to $SPLUNK_HOME/var/lib/splunk/&amp;lt;index&amp;gt;/db/&amp;lt;bucket&amp;gt; and view the Hosts.data file&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2010 02:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9937#M314</guid>
      <dc:creator>oreoshake</dc:creator>
      <dc:date>2010-03-03T02:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9938#M315</link>
      <description>&lt;P&gt;Hosts.data will certainly show you the set of hosts that were on events which contributed to the bucket.  With a bit of work you can also parse the time ranges yourself (the fields there, on a per host basis).  There isn't really an exposed way to search on specific buckets, however.  There's an internal field which represents the source bucket, so it is possible, but the names used are not the filesystem names.  If this seems genuinely useful, I can go rediscover it.  I'm not sure that this machinery is intended to be used, or possibly useful outside of troubleshooting cases.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2010 06:45:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9938#M315</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-03-06T06:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9939#M316</link>
      <description>&lt;P&gt;Yes, I would be interested in this.  Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2010 05:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9939#M316</guid>
      <dc:creator>oreoshake</dc:creator>
      <dc:date>2010-03-10T05:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9940#M317</link>
      <description>&lt;P&gt;An easy way to find the timestamps for events, is to use the metadata command in combination with a stats operator.   You can use any type of metadata, but your final query might look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts | stats min(recentTime) as last_event by host | sort +last_event
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above search finds the timestamp of the last event sent to splunk by a specific host, sorted by the the UTC timestamp.   You can also do the same for sources and sourcetypes.&lt;/P&gt;

&lt;P&gt;To make this humanly readable:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts | stats min(recentTime) as last_utc by host | convert ctime(last_utc) as 
last_event
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Apr 2010 05:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9940#M317</guid>
      <dc:creator>Simeon</dc:creator>
      <dc:date>2010-04-24T05:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9941#M318</link>
      <description>&lt;P&gt;Yes, you can.&lt;/P&gt;

&lt;P&gt;The _bkt field is available (though sadly, not as a search term in the &lt;EM&gt;first&lt;/EM&gt; part of a search before the first |, but you &lt;EM&gt;can&lt;/EM&gt; search on it). You'll need to know the index name, the bucket ID, and the GUID of the server itself. In 4.x instances, this is the guid parameter in the [general] stanza of server.conf. In 5.x, it's stored in $SPLUNK_HOME/etc/instance.cfg.&lt;/P&gt;

&lt;P&gt;I was able to run this search for bucket ID 22 of the summary index:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
index=summary | where _bkt="summary~22~4F582768-7B38-4768-95EA-EC3D491A8A23"&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2013 18:02:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9941#M318</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-03-17T18:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can I search specific buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9942#M319</link>
      <description>&lt;P&gt;Brilliant! I have been looking for how long to do this. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 23:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-search-specific-buckets/m-p/9942#M319</guid>
      <dc:creator>ephemeric</dc:creator>
      <dc:date>2013-05-15T23:04:16Z</dc:date>
    </item>
  </channel>
</rss>

