Getting Information on Nodes

  • reference
    +
    Information on a cluster’s individual nodes can be retrieved, by means of the REST API.

    HTTP Method and URI

    GET /pools/nodes

    Description

    Returns a JSON object containing an array, each of whose members is a node in the cluster. For each node, returned data includes identifiers for the node, a list of installed services, the settings for encryption and address family, memory and hardware information, rebalance status, bucket configuration, and URIs to be used in cluster-management.

    For data to be returned, the administrator must authenticate with the Full Admin. the Cluster Admin, or the Read-Only Admin role.

    Curl Syntax

    curl -X GET -u <username>:<password>
      http://<ip-address-or-hostname>:8091/pools/nodes

    Responses

    Success returns 200 OK, and a JSON object containing information on the nodes in the cluster. Failure to authenticate returns 401 Unauthorized. An incorrectly specified URI returns 404 Object Not Found.

    Example

    The following example returns information on the nodes of a two-node cluster. Note that the output is piped to the jq program, to enhance output-readability.

    curl -u Administrator:password -X GET http://localhost:8091/pools/nodes | jq '.'

    Successful execution produces the following output:

    {
      "name": "default",
      "nodes": [
        {
          "clusterMembership": "active",
          "recoveryType": "none",
          "status": "healthy",
          "otpNode": "ns_1@10.144.210.101",
          "thisNode": true,
          "hostname": "10.144.210.101:8091",
          "nodeUUID": "b71eeda1078c2dcb903b10ecd7b69d7c",
          "clusterCompatibility": 458752,
          "version": "7.0.1-6002-enterprise",
          "os": "x86_64-unknown-linux-gnu",
          "cpuCount": 1,
          "ports": {
            "direct": 11210,
            "httpsCAPI": 18092,
            "httpsMgmt": 18091,
            "distTCP": 21100,
            "distTLS": 21150
          },
          "services": [
            "backup",
            "index",
            "kv",
            "n1ql"
          ],
          "nodeEncryption": false,
          "addressFamilyOnly": true,
          "configuredHostname": "10.144.210.101:8091",
          "addressFamily": "inet",
          "externalListeners": [
            {
              "afamily": "inet",
              "nodeEncryption": false
            }
          ],
          "couchApiBase": "http://10.144.210.101:8092/",
          "couchApiBaseHTTPS": "https://10.144.210.101:18092/",
          "systemStats": {
            "cpu_utilization_rate": 98.7012987012987,
            "cpu_stolen_rate": 0,
            "swap_total": 2047864832,
            "swap_used": 490958848,
            "mem_total": 1032990720,
            "mem_free": 181211136,
            "mem_limit": 1032990720,
            "cpu_cores_available": 1,
            "allocstall": 0
          },
          "interestingStats": {
            "couch_docs_actual_disk_size": 62926040,
            "couch_views_actual_disk_size": 0,
            "curr_items": 31588,
            "curr_items_tot": 63288,
            "ep_bg_fetched": 0,
            "couch_docs_data_size": 48364650,
            "mem_used": 78348816,
            "vb_replica_curr_items": 31700,
            "vb_active_num_non_resident": 0,
            "cmd_get": 0,
            "get_hits": 0,
            "ops": 0,
            "index_data_size": 66749926,
            "index_disk_size": 42967617,
            "couch_spatial_disk_size": 0,
            "couch_views_data_size": 0,
            "couch_spatial_data_size": 0
          },
          "uptime": "71151",
          "memoryTotal": 1032990720,
          "memoryFree": 181211136,
          "mcdMemoryReserved": 788,
          "mcdMemoryAllocated": 788
        },
        {
          "clusterMembership": "active",
          "recoveryType": "none",
          "status": "healthy",
          "otpNode": "ns_1@10.144.210.102",
          "hostname": "10.144.210.102:8091",
          "nodeUUID": "def51e43199a09925b867d5853b0587b",
          "clusterCompatibility": 458752,
          "version": "7.0.1-6002-enterprise",
          "os": "x86_64-unknown-linux-gnu",
          "cpuCount": 1,
          "ports": {
            "direct": 11210,
            "httpsCAPI": 18092,
            "httpsMgmt": 18091,
            "distTCP": 21100,
            "distTLS": 21150
          },
          "services": [
            "fts",
            "kv"
          ],
          "nodeEncryption": false,
          "addressFamilyOnly": true,
          "configuredHostname": "10.144.210.102:8091",
          "addressFamily": "inet",
          "externalListeners": [
            {
              "afamily": "inet",
              "nodeEncryption": false
            }
          ],
          "couchApiBase": "http://10.144.210.102:8092/",
          "couchApiBaseHTTPS": "https://10.144.210.102:18092/",
          "systemStats": {
            "cpu_utilization_rate": 6.096256684491979,
            "cpu_stolen_rate": 0,
            "swap_total": 2047864832,
            "swap_used": 43700224,
            "mem_total": 1032990720,
            "mem_free": 306143232,
            "mem_limit": 1032990720,
            "cpu_cores_available": 1,
            "allocstall": 0
          },
          "interestingStats": {
            "couch_docs_actual_disk_size": 66174134,
            "couch_views_actual_disk_size": 0,
            "curr_items": 31700,
            "curr_items_tot": 63288,
            "ep_bg_fetched": 0,
            "couch_docs_data_size": 48367642,
            "mem_used": 87317680,
            "vb_replica_curr_items": 31588,
            "vb_active_num_non_resident": 0,
            "cmd_get": 0,
            "get_hits": 0,
            "ops": 0,
            "couch_spatial_disk_size": 0,
            "couch_views_data_size": 0,
            "couch_spatial_data_size": 0
          },
          "uptime": "70725",
          "memoryTotal": 1032990720,
          "memoryFree": 306143232,
          "mcdMemoryReserved": 788,
          "mcdMemoryAllocated": 788
        }
      ],
      "buckets": {
        "uri": "/pools/default/buckets?v=133990083&uuid=8ebd144e243c942109c19842bdec9cdd",
        "terseBucketsBase": "/pools/default/b/",
        "terseStreamingBucketsBase": "/pools/default/bs/"
      },
      "bucketNames": [
        {
          "bucketName": "travel-sample",
          "uuid": "a155458a6fa79f661d7586816cddc860"
        }
      ],
      "remoteClusters": {
        "uri": "/pools/default/remoteClusters?uuid=8ebd144e243c942109c19842bdec9cdd",
        "validateURI": "/pools/default/remoteClusters?just_validate=1"
      },
      "alerts": [],
      "alertsSilenceURL": "/controller/resetAlerts?uuid=8ebd144e243c942109c19842bdec9cdd&token=0",
      "controllers": {
        "addNode": {
          "uri": "/controller/addNodeV2?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "rebalance": {
          "uri": "/controller/rebalance?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "failOver": {
          "uri": "/controller/failOver?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "startGracefulFailover": {
          "uri": "/controller/startGracefulFailover?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "reAddNode": {
          "uri": "/controller/reAddNode?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "reFailOver": {
          "uri": "/controller/reFailOver?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "ejectNode": {
          "uri": "/controller/ejectNode?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "setRecoveryType": {
          "uri": "/controller/setRecoveryType?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "setAutoCompaction": {
          "uri": "/controller/setAutoCompaction?uuid=8ebd144e243c942109c19842bdec9cdd",
          "validateURI": "/controller/setAutoCompaction?just_validate=1"
        },
        "clusterLogsCollection": {
          "startURI": "/controller/startLogsCollection?uuid=8ebd144e243c942109c19842bdec9cdd",
          "cancelURI": "/controller/cancelLogsCollection?uuid=8ebd144e243c942109c19842bdec9cdd"
        },
        "replication": {
          "createURI": "/controller/createReplication?uuid=8ebd144e243c942109c19842bdec9cdd",
          "validateURI": "/controller/createReplication?just_validate=1"
        }
      },
      "rebalanceStatus": "none",
      "rebalanceProgressUri": "/pools/default/rebalanceProgress",
      "stopRebalanceUri": "/controller/stopRebalance?uuid=8ebd144e243c942109c19842bdec9cdd",
      "nodeStatusesUri": "/nodeStatuses",
      "maxBucketCount": 30,
      "maxCollectionCount": 1200,
      "maxScopeCount": 1200,
      "autoCompactionSettings": {
        "parallelDBAndViewCompaction": false,
        "databaseFragmentationThreshold": {
          "percentage": 30,
          "size": "undefined"
        },
        "viewFragmentationThreshold": {
          "percentage": 30,
          "size": "undefined"
        },
        "indexCompactionMode": "circular",
        "indexCircularCompaction": {
          "daysOfWeek": "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
          "interval": {
            "fromHour": 0,
            "toHour": 0,
            "fromMinute": 0,
            "toMinute": 0,
            "abortOutside": false
          }
        },
        "indexFragmentationThreshold": {
          "percentage": 30
        }
      },
      "tasks": {
        "uri": "/pools/default/tasks?v=37542573"
      },
      "counters": {
        "rebalance_success": 1,
        "rebalance_start": 1
      },
      "indexStatusURI": "/indexStatus?v=53367716",
      "serverGroupsUri": "/pools/default/serverGroups?v=50544850",
      "clusterName": "10.144.210.101",
      "balanced": true,
      "checkPermissionsURI": "/pools/default/checkPermissions",
      "memoryQuota": 512,
      "indexMemoryQuota": 256,
      "ftsMemoryQuota": 256,
      "cbasMemoryQuota": 1024,
      "eventingMemoryQuota": 256,
      "storageTotals": {
        "ram": {
          "total": 2065981440,
          "quotaTotal": 1073741824,
          "quotaUsed": 419430400,
          "used": 1910071296,
          "usedByData": 165666496,
          "quotaUsedPerNode": 209715200,
          "quotaTotalPerNode": 536870912
        },
        "hdd": {
          "total": 264449089536,
          "quotaTotal": 264449089536,
          "used": 10577963580,
          "usedByData": 129100174,
          "free": 253871125956
        }
      }
    }

    The nodes array contains two objects, one each for the nodes 10.144.210.101 and 10.144.210.102. For each node, a CPU count and a list of ports is provided, and the health of the node is displayed. The services for each node are listed. Address-family and encryption status are listed; as are various statistics related to memory and storage. Information is provided on the sole bucket defined on the cluster; and various URIs for cluster-management are displayed.

    See Also

    For an architectural overview of how nodes are combined into a cluster, see Nodes. For step-by-step procedures for node management, see Manage Nodes and Clusters.