Querying Monitoring Information About Resource Pool Nodes

Function

This API is used to query monitoring information about resource pool nodes.

URI

GET /v1/{project_id}/pools/{pool_id}/nodes/{node_ip}/metric-statistic

Table 1 describes the required parameters.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

pool_id

Yes

String

ID of a dedicated resource pool

node_ip

Yes

String

IP address of a resource pool node, which is obtained from the response of the pool details query API

Request Body

Table 2 describes the request parameters.
Table 2 Parameter description

Parameter

Mandatory

Type

Description

metrics

No

String

Metrics to be queried. Separate metrics by commas (,), for example, CpuUsage,MemUsage. If this parameter is left blank, all metrics are queried.

Options:

  • CpuUsage: CPU usage
  • MemUsage: memory usage
  • DiskReadRate: disk read rate
  • DiskWriteRate: disk write rate
  • RecvBytesRate: network receiving rate
  • SendBytesRate: network sending rate
  • GpuUtil: GPU usage
  • GpuMemUsage: GPU memory usage

statistic_type

No

String

Metric statistics method, indicating whether to collect metric statistics based on a single GPU. This parameter applies only to GPU metric statistics.

  • all: Obtain the average value of the metric.
  • each: Obtain the metric monitoring information about each GPU.

Response Body

Table 3 describes the response parameters.
Table 3 Parameter description

Parameter

Type

Description

error_message

String

Error message of a failed API call.

This parameter is not included when the API call succeeds.

error_code

String

Indicates the error code when the API fails to be called. Error code of a failed API call. For details, see Error Codes.

This parameter is not included when the API call succeeds.

metrics

Json Array

Metric monitoring details. For details, see Table 4.

interval

Integer

Query interval, in minutes.

Table 4 metrics data structure

Parameter

Type

Description

metric

String

Monitoring metrics

value

Json Array

Sequence of the obtained metric value. The element is of the String type.

Samples

The following example queries monitoring information about node 192.168.1.1 in the dedicated resource pool poolabcd.

Status Code

For details about the status code, see Status Code.