A newer version of this documentation is available.

View Latest

Getting Storage Information

  • reference
    +
    Comprehensive information on cluster-node storage can be retrieved with the GET /nodes/self HTTP method and URI.

    HTTP method and URI

    GET /nodes/self

    Description

    This retrieves information on storage facilities for the specified node.

    Curl Syntax

    curl -X GET -u <administrator>:<password> http://<host>:<port> /nodes/self

    Responses

    Success gives 200 OK, and returns an object containing information on storage for the specified node (see the Example, immediately below). Failure to authenticate gives 401 Unauthorized. An improperly specified URI returns "Node is unknown to this cluster."

    Example

    Request storage information on a cluster-node as follows. Note that the output is here piped to the jq command, to optimize readability.

    curl -X GET -u Administrator:password \
    http://10.143.192.102:8091/nodes/self | jq '.'

    If successful, this returns output such as the following:

    {
      "availableStorage": {
        "hdd": [
          {
            "path": "/dev",
            "sizeKBytes": 490200,
            "usagePercent": 0
          },
          {
            "path": "/run",
            "sizeKBytes": 101636,
            "usagePercent": 4
          },
          {
            "path": "/",
            "sizeKBytes": 19498876,
            "usagePercent": 21
          },
          {
            "path": "/dev/shm",
            "sizeKBytes": 508164,
            "usagePercent": 0
          },
          {
            "path": "/run/lock",
            "sizeKBytes": 5120,
            "usagePercent": 0
          },
          {
            "path": "/sys/fs/cgroup",
            "sizeKBytes": 508164,
            "usagePercent": 0
          },
          {
            "path": "/boot",
            "sizeKBytes": 482922,
            "usagePercent": 12
          },
          {
            "path": "/vagrant",
            "sizeKBytes": 243924992,
            "usagePercent": 90
          },
          {
            "path": "/vmhost_home",
            "sizeKBytes": 243924992,
            "usagePercent": 90
          },
          {
            "path": "/tmp/vagrant-puppet/manifests-126a55cfdd35668185d2724f19ed045b",
            "sizeKBytes": 243924992,
            "usagePercent": 90
          }
        ]
      },
      "storageTotals": {
        "ram": {
          "total": 1040723968,
          "quotaTotal": 536870912,
          "quotaUsed": 536870912,
          "used": 934690816,
          "usedByData": 82461848,
          "quotaUsedPerNode": 536870912,
          "quotaTotalPerNode": 536870912
        },
        "hdd": {
          "total": 19966849024,
          "quotaTotal": 19966849024,
          "used": 4193038295,
          "usedByData": 60094866,
          "free": 15773810729
        }
      },
      "storage": {
        "ssd": [],
        "hdd": [
          {
            "path": "/opt/couchbase/var/lib/couchbase/data",
            "index_path": "/opt/couchbase/var/lib/couchbase/data",
            "cbas_dirs": [
              "/opt/couchbase/var/lib/couchbase/data"
            ],
            "java_home": "",
            "quotaMb": "none",
            "state": "ok"
          }
        ]
      },
      "systemStats": {
        "cpu_utilization_rate": 6.185567010309279,
        "swap_total": 536866816,
        "swap_used": 0,
        "mem_total": 1040723968,
        "mem_free": 412700672,
        "mem_limit": 1040723968,
        "cpu_cores_available": 1
      },
      "interestingStats": {
        "cmd_get": 0,
        "couch_docs_actual_disk_size": 60094866,
        "couch_docs_data_size": 0,
        "couch_spatial_data_size": 0,
        "couch_spatial_disk_size": 0,
        "couch_views_actual_disk_size": 0,
        "couch_views_data_size": 0,
        "curr_items": 31591,
        "curr_items_tot": 31591,
        "ep_bg_fetched": 0,
        "get_hits": 0,
        "mem_used": 82461848,
        "ops": 0,
        "vb_active_num_non_resident": 0,
        "vb_replica_curr_items": 0
      },
      "uptime": "1133",
      "memoryTotal": 1040723968,
      "memoryFree": 412700672,
      "mcdMemoryReserved": 794,
      "mcdMemoryAllocated": 794,
      "couchApiBase": "http://10.143.192.102:8092/",
      "couchApiBaseHTTPS": "https://10.143.192.102:18092/",
      "otpCookie": "b0eff2ada66bd6fd6b8d6a371d1a0e09de74c3a938445fcec718f8a6514947d4",
      "clusterMembership": "active",
      "recoveryType": "none",
      "status": "healthy",
      "otpNode": "ns_1@127.0.0.1",
      "thisNode": true,
      "hostname": "10.143.192.102:8091",
      "nodeUUID": "bcb7787c4b596b2d21e7b53e2d413d0d",
      "clusterCompatibility": 393221,
      "version": "6.5.0-3975-enterprise",
      "os": "x86_64-unknown-linux-gnu",
      "cpuCount": 1,
      "ports": {
        "direct": 11210,
        "httpsCAPI": 18092,
        "httpsMgmt": 18091,
        "distTCP": 21100,
        "distTLS": 21150
      },
      "services": [
        "kv"
      ],
      "addressFamily": "inet",
      "nodeEncryption": false,
      "externalListeners": [
        {
          "afamily": "inet",
          "nodeEncryption": false
        },
        {
          "afamily": "inet6",
          "nodeEncryption": false
        }
      ],
      "memoryQuota": 512,
      "indexMemoryQuota": 512,
      "ftsMemoryQuota": 256,
      "cbasMemoryQuota": 1024,
      "eventingMemoryQuota": 256
    }

    This output includes the following:

    • availableStorage. Contains an hdd array, each of whose members is an object providing the local paths, allocated storage maximums, and current usage-percent figures for available disk-based storage on the specified node.

    • storageTotals. Contains ram and hdd objects, which respectively provide current usage-totals for memory and disk.

    • storage. Information that includes the paths initialized for data, indexes, and analytics.

    • systemStats and interestingStats. Statistical information; including utilization figures for cpu and memory, and data and disk sizes.

    • Other information includes memory quotas, ports, hostname, IP address, and uptime.

    See Also

    For an overview of nodes and their creation — including the initializing of data-paths — see Nodes.