Viewing Cluster Details
Cluster details are retrieved with GET /pools/default
HTTP method and URI.
Syntax
Curl request syntax:
curl -u [admin]:[password] http://[localhost]:8091/pools/default
HTTP request syntax:
GET /pools/default Host: localhost:8091 Authorization: Basic xxxxxxxxxxxxxxxxxxx Accept: application/json X-memcachekv-Store-Client-Specification-Version: 0.1
Description
At the highest level, the response for this request describes a cluster, as mentioned previously. The response contains a number of properties which define attributes of the cluster and controllers which enable you to make certain requests of the cluster.
Since buckets could be renamed and there is no way to determine the name for the default bucket for a cluster, the system attempts to connect non-SASL, non-proxied to a bucket named "default". If it does not exist, Couchbase Server drops the connection. |
Do not rely on the server list returned by this request to connect to Couchbase Server. Instead, issue an HTTP GET call to the bucket to get the node list for that specific bucket.
HTTP method and URI
GET /pools/default
The controllers in the server list all accept parameters as x-www-form-urlencoded
, and perform the following functions:
Function | Description |
---|---|
ejectNode |
Eject a node from the cluster. Required parameter: "otpNode", the node to be ejected. |
addNode |
Add a node to this cluster. Required parameters: "hostname", "user" and "password". Username and password are for the Administrator for this node. |
rebalance |
Rebalance the existing cluster. This controller requires both "knownNodes" and "ejectedNodes". This enables a client to state the existing known nodes and designate which nodes should be removed from the cluster in a single operation. To ensure no cluster state changes have occurred since a client last got a list of nodes, both the known nodes and the node to be ejected must be supplied. If the list does not match the set of nodes, the request will fail with an HTTP 400 indicating a mismatch. Note rebalance progress is available via the rebalanceProgress uri. |
failover |
Failover the vBuckets from a given node to the nodes which have replicas of data for those vBuckets. The "otpNode" parameter is required and specifies the node to be failed over. |
reAddNode |
The "otpNode" parameter is required and specifies the node to be re-added. |
stopRebalance |
Stop any rebalance operation currently running. This takes no parameters. |
Example
To send a request using curl:
curl -u Administrator:password http://10.5.2.117:8091/pools/default
Response
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3784 100 3784 0 0 501k 0 --:--:-- --:--:-- --:--:-- 527k { "alerts": [], "alertsSilenceURL": "/controller/resetAlerts?token=0&uuid=995618a6a6cc9ac79731bd13240e19b5", "autoCompactionSettings": { "databaseFragmentationThreshold": { "percentage": 30, "size": "undefined" }, "parallelDBAndViewCompaction": false, "viewFragmentationThreshold": { "percentage": 30, "size": "undefined" } }, "buckets": { "terseBucketsBase": "/pools/default/b/", "terseStreamingBucketsBase": "/pools/default/bs/", "uri": "/pools/default/buckets?v=109484346&uuid=995618a6a6cc9ac79731bd13240e19b5" }, "controllers": { "addNode": { "uri": "/controller/addNode?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "clusterLogsCollection": { "cancelURI": "/controller/cancelLogsCollection?uuid=995618a6a6cc9ac79731bd13240e19b5", "startURI": "/controller/startLogsCollection?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "ejectNode": { "uri": "/controller/ejectNode?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "failOver": { "uri": "/controller/failOver?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "reAddNode": { "uri": "/controller/reAddNode?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "reFailOver": { "uri": "/controller/reFailOver?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "rebalance": { "uri": "/controller/rebalance?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "replication": { "createURI": "/controller/createReplication?uuid=995618a6a6cc9ac79731bd13240e19b5", "validateURI": "/controller/createReplication?just_validate=1" }, "setAutoCompaction": { "uri": "/controller/setAutoCompaction?uuid=995618a6a6cc9ac79731bd13240e19b5", "validateURI": "/controller/setAutoCompaction?just_validate=1" }, "setFastWarmup": { "uri": "/controller/setFastWarmup?uuid=995618a6a6cc9ac79731bd13240e19b5", "validateURI": "/controller/setFastWarmup?just_validate=1" }, "setRecoveryType": { "uri": "/controller/setRecoveryType?uuid=995618a6a6cc9ac79731bd13240e19b5" }, "startGracefulFailover": { "uri": "/controller/startGracefulFailover?uuid=995618a6a6cc9ac79731bd13240e19b5" } }, "counters": {}, "fastWarmupSettings": { "fastWarmupEnabled": true, "minItemsThreshold": 10, "minMemoryThreshold": 10 }, "maxBucketCount": 30, "name": "default", "nodeStatusesUri": "/nodeStatuses", "nodes": [ { "clusterCompatibility": 196608, "clusterMembership": "active", "couchApiBase": "http://10.5.2.117:8092/", "hostname": "10.5.2.117:8091", "interestingStats": { "cmd_get": 0, "couch_docs_actual_disk_size": 34907796, "couch_docs_data_size": 33648640, "couch_views_actual_disk_size": 0, "couch_views_data_size": 0, "curr_items": 0, "curr_items_tot": 0, "ep_bg_fetched": 0, "get_hits": 0, "mem_used": 66961824, "ops": 0, "vb_replica_curr_items": 0 }, "mcdMemoryAllocated": 3159, "mcdMemoryReserved": 3159, "memoryFree": 2939863040, "memoryTotal": 4140740608, "os": "x86_64-unknown-linux-gnu", "otpCookie": "cjcmfayctwcdgpbk", "otpNode": "ns_1@10.5.2.117", "ports": { "direct": 11210, "httpsCAPI": 18092, "httpsMgmt": 18091, "proxy": 11211, "sslProxy": 11214 }, "recoveryType": "none", "status": "healthy", "systemStats": { "cpu_utilization_rate": 1.256281407035176, "mem_free": 2939863040, "mem_total": 4140740608, "swap_total": 6140452864, "swap_used": 0 }, "thisNode": true, "uptime": "1815879", "version": "3.0.0-1209-rel-enterprise" } ], "rebalanceProgressUri": "/pools/default/rebalanceProgress", "rebalanceStatus": "none", "remoteClusters": { "uri": "/pools/default/remoteClusters?uuid=995618a6a6cc9ac79731bd13240e19b5", "validateURI": "/pools/default/remoteClusters?just_validate=1" }, "serverGroupsUri": "/pools/default/serverGroups?v=122320066", "stopRebalanceUri": "/controller/stopRebalance?uuid=995618a6a6cc9ac79731bd13240e19b5", "storageTotals": { "hdd": { "free": 46188516230, "quotaTotal": 56327458816, "total": 56327458816, "used": 10138942586, "usedByData": 34907796 }, "ram": { "quotaTotal": 536870912, "quotaTotalPerNode": 536870912, "quotaUsed": 536870912, "quotaUsedPerNode": 536870912, "total": 4140740608, "used": 3895349248, "usedByData": 66961824 } }, "tasks": { "uri": "/pools/default/tasks?v=67144358" }, "visualSettingsUri": "/internalSettings/visual?v=7111573" }