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 in the specified time range. If nodeID is not specified, it returns this information for all nodes in the instance. If the time range is specified, the returned usage information is the average value of all the usage over the specified time range. If time range is not specified, the latest usage information is returned, plus a one minute time range.

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>&startTime=<yyyymmddhhmmss>&endTime=yyyymmddhhmmss"

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=peer0-1&startTime=20190224000000&endTime=20190224050000"

Example of the Response Body

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

{
  "data": [
    {
      "nodeId": "peer0-1",
      "nodeType": "peer",
      "resUsage": {
        "startTime": "Sun, 24 Feb 2019 00:00:00 GMT",
        "endTime": "Sun, 24 Feb 2019 05:00:00 GMT",
        "cpu": 2.8215833333333333,
        "memory": 0.34320972222222224,
        "disk": 0.065
      }
    }
  ]
}
Back to Top