<?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: Get bucket IDs corresponding to events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19827#M2837</link>
    <description>&lt;P&gt;You can use the _cd field, which contains "bucket_id:event_offset" for that particular event.&lt;/P&gt;

&lt;P&gt;I used the following search to find which buckets my events were going into:&lt;/P&gt;

&lt;P&gt;index=myindex | eval BID = replace(_cd, "(\d+):\d+", "\1") | top BID&lt;/P&gt;

&lt;P&gt;Remember that bucket IDs only have meaning within that index, not across them. You could easily do things like filter by timerange:&lt;/P&gt;

&lt;P&gt;index=myindex _time&amp;gt;=1234567890 _time&amp;lt;=1234567899| eval BID = replace(_cd, "(\d+):\d+", "\1") | top BID&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jan 2011 11:03:27 GMT</pubDate>
    <dc:creator>Marklar</dc:creator>
    <dc:date>2011-01-01T11:03:27Z</dc:date>
    <item>
      <title>Get bucket IDs corresponding to events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19826#M2836</link>
      <description>&lt;P&gt;How can I find the corresponding bucket IDs for specific events in an index?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2011 10:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19826#M2836</guid>
      <dc:creator>Marklar</dc:creator>
      <dc:date>2011-01-01T10:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get bucket IDs corresponding to events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19827#M2837</link>
      <description>&lt;P&gt;You can use the _cd field, which contains "bucket_id:event_offset" for that particular event.&lt;/P&gt;

&lt;P&gt;I used the following search to find which buckets my events were going into:&lt;/P&gt;

&lt;P&gt;index=myindex | eval BID = replace(_cd, "(\d+):\d+", "\1") | top BID&lt;/P&gt;

&lt;P&gt;Remember that bucket IDs only have meaning within that index, not across them. You could easily do things like filter by timerange:&lt;/P&gt;

&lt;P&gt;index=myindex _time&amp;gt;=1234567890 _time&amp;lt;=1234567899| eval BID = replace(_cd, "(\d+):\d+", "\1") | top BID&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2011 11:03:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19827#M2837</guid>
      <dc:creator>Marklar</dc:creator>
      <dc:date>2011-01-01T11:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get bucket IDs corresponding to events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19828#M2838</link>
      <description>&lt;P&gt;Take care! the rex in the "replace" commando is wrong because the backslash before "d+"  and before "1" is truncated by this editor!!!&lt;/P&gt;

&lt;P&gt;Il should be&lt;BR /&gt;
    index=myindex | eval BID = replace(_cd, "('backslash'd+):'backslash'd+", "'backslash'1") | top BID&lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 15:07:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19828#M2838</guid>
      <dc:creator>marcoscala</dc:creator>
      <dc:date>2014-10-20T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get bucket IDs corresponding to events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19829#M2839</link>
      <description>&lt;P&gt;Thanks. I ended up with a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search here | eval bucket_event_id=_cd | rex field=bucket_event_id "(?&amp;lt;bucket_id&amp;gt;[^:]+):" | stats count by index sourcetype splunk_server bucket_id | sort splunk_server bucket_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2015 21:08:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19829#M2839</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2015-03-24T21:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get bucket IDs corresponding to events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19830#M2840</link>
      <description>&lt;P&gt;On Splunk 6.4, _cd doesn't seem to be a field...  Does anyone know how to identify which bucket an even is in on the newer versions?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 19:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Get-bucket-IDs-corresponding-to-events/m-p/19830#M2840</guid>
      <dc:creator>bbialek</dc:creator>
      <dc:date>2016-06-22T19:49:50Z</dc:date>
    </item>
  </channel>
</rss>

