Splunk Search

Search Bucket ID Range

ephemeric
Contributor

Greetz,

Is it possible to search a range of bucket ids?

I have moved a lot of warm/cold buckets and scrubbed the ids and would like to do this search to get an event count and compare to the count prior to moving the buckets on the old Splunk instance.

Thank you.

Tags (3)
0 Karma
1 Solution

sowings
Splunk Employee
Splunk Employee

Sort of. When you run a search, there's a field called _bkt that gets populated with the bucket's directory name. You'd first have to get the time endpoints for the search from the buckets themselves. The first 10-digit number in a bucket's directory name is the "latestTime" in epoch, and the second 10-digit number is the earliestTime epoch. Take the max and min of those respectively to determine your overall range for the range of buckets. Next, search over a custom time range (you should be able to enter an epoch time in the time picker), then rename _bkt to something without a leading (e.g. "bucket") , and then you should be able to stats count by bucket, or other search-y things like that.

View solution in original post

sowings
Splunk Employee
Splunk Employee

Sort of. When you run a search, there's a field called _bkt that gets populated with the bucket's directory name. You'd first have to get the time endpoints for the search from the buckets themselves. The first 10-digit number in a bucket's directory name is the "latestTime" in epoch, and the second 10-digit number is the earliestTime epoch. Take the max and min of those respectively to determine your overall range for the range of buckets. Next, search over a custom time range (you should be able to enter an epoch time in the time picker), then rename _bkt to something without a leading (e.g. "bucket") , and then you should be able to stats count by bucket, or other search-y things like that.

ephemeric
Contributor

Thank you.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...