Deployment Architecture

How do I get a count of unique and total buckets in my environment?

davidpaper
Contributor

I want to know how many buckets I have in my indexing clustered environment, both the total count of all buckets and how many of them are unique.

1 Solution

davidpaper
Contributor

On the cluster master, the following search provides answers to both questions.

| rest splunk_server=local /services/cluster/master/peers 
| stats sum(bucket_count) AS bucket_count_all 
| eval bucket_count = round(bucket_count_all / 1000 / 1000,2)."M" 
| eval replication_factor = 
    [| rest splunk_server=local /services/cluster/config 
    | return $replication_factor ] 
| eval unique = round(bucket_count_all / replication_factor / 1000 / 1000,2)."M" 
| fields bucket_count unique 
| rename bucket_count AS "Total Buckets", unique AS "Unique Buckets"

View solution in original post

davidpaper
Contributor

On the cluster master, the following search provides answers to both questions.

| rest splunk_server=local /services/cluster/master/peers 
| stats sum(bucket_count) AS bucket_count_all 
| eval bucket_count = round(bucket_count_all / 1000 / 1000,2)."M" 
| eval replication_factor = 
    [| rest splunk_server=local /services/cluster/config 
    | return $replication_factor ] 
| eval unique = round(bucket_count_all / replication_factor / 1000 / 1000,2)."M" 
| fields bucket_count unique 
| rename bucket_count AS "Total Buckets", unique AS "Unique Buckets"

twinspop
Influencer

Excellent, thx! 2 follow-ups: 1) Does S2 change this search at all? 2) Which of the numbers is applicable to the 5m bucket suggested limit?

0 Karma

dpaper_splunk
Splunk Employee
Splunk Employee

1) Nope, I did my testing for this on an SmartStore enabled stack.
2) The bucket limits are Splunk version dependent. The 5m bucket limit I'm aware of is from 6.6 -> 7.1 and it's 5M unique buckets, 15M total buckets (with default RF=3). So both values may apply.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...