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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...