Get the Node Usage Related Metrics

get

/console/admin/api/v1.1/dashboard/statistics/nodeRes

Get the node usage related metrics: CPU, memory, disk usage.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Response with a series of usage records by restriction
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : StatsNodeRes
Type: object
Show Source
Nested Schema : resUsage
Type: object
Show Source

400 Response

invalid arguments
Body ()
Root Schema : 400errorModels
Type: object
Show Source
Example:
{
    "respMesg":"invalid argument"
}

Default Response

unexpected error
Body ()
Root Schema : errorModel
Type: object
Show Source
Back to Top

Examples

This endpoint is used to get the node usage related metrics such as CPU, memory, and disk usage percentages, reflecting the health metrics you can see on the console. The result is a JSON body which contains a series of usage records for the specified nodes.

If nodeID is not specified, it returns this information for all nodes in the instance.

The following example shows how to generate the node metrics by submitting a GET request on the REST resource using cURL.

curl -X GET -u username:password -k 
"http://<rest_server_url>:port/console/admin/api/v1.1/dashboard/statistics/nodeRes?nodeID=<nodeID>"

For example,

curl -X GET -u myname@oracle.com:mypswd -k 
"http://server.oracle.com:10000/console/admin/api/v1.1/dashboard/statistics/nodeRes?nodeID=orderer0"

Example of the Response Body

The following example shows the contents of the response body in JSON format:

{
  "data": [
    {
      "nodeId": "orderer0",
      "nodeType": "orderer",
      "resUsage": {
        "cpu": 0.76,
        "memory": 0.656,
        "disk": 2.772
      }
    }
  ]
}

This is an example of the output for the node orderer0. The resource usage disk : 2.772 means that orderer0 occupies 2.772% of total disk storage (/u01). Note that this does not mean that there is 97.228% (100% - 2.772%) free space available for orderer0; disk storage (/u01) is shared by all the orderers and peers running on the VM.

Back to Top