Replica and Active Vbucket count

Hi Team,

I need a command to check active and replica v bucket count likewise we are getting under vbucket resource graph in UI. We know the below command will show active and replica bucket count but in case my node is having multiple nodes, I need to go and check each node to find out where config bucket replica and active vbuckets reside.

./cbstats -u cbadmin -p cbadmin -b config xx.xx.xx.xx:11210 vbucket

I need cbstat or curl command so that I will trigger any node of cluster just to check the count.

Thanks,
Debasis

the bucket config map for the whole cluster is available from any management node:

http://myserver:8091/pools/default/buckets/my_bucket

Thanks @mreiche for your response. But I want the count of number of active vbucket and replica vbucket as we are performing a server group failure scenario to check whether the active vbuckets(1024) and replica vbuckets(1024) counts are getting changed according to our test case. The below number is showing more than the 1024 counts which is non-relatable.

“vb_replica_curr_items”: 110788

So can you tell the exact parameter which need to check only to verify the count of active vbucket and replica vbucket.

Thanks,
Debasis

The url I provided will return (amongst other things) an array of number-of-vbuckets x number-of-nodes. The first element of each number-of-nodes array is the index of the active node, a value of -1 indicates there is no active copy. Subsequent entries are the index of the replicas, a value if -1 indicates there is no (n-1) replica.

@mreiche . Below is the command to get all count.

curl -s -X GET -u admin:admin http://xx.xx.xx.xx:8091/pools/default/buckets/config/stats | jq ‘.’ | grep -E -i -A 2 ‘“vb_replica_num”|“vb_active_num”|“curr_items”’

So you have what you need then?

no previously not able to found after doing some research I found it. SO posted if someone looks in forum can help them.

Thanks,
Debasis

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.