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!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...