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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...