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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...