Monitoring a Resource Pool
Function
This API is used to obtain the monitored resource pool information.
URI
GET /v2/{project_id}/pools/{pool_name}/monitor
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
pool_name |
Yes |
String |
Automatically generated resource pool name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
time_range |
No |
String |
Default value: -1.-1.60 |
statistics |
No |
String |
Default value: maximum |
period |
No |
String |
Default value: 60 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
metrics |
Array of metrics objects |
Metric list. The value is a JSON array that contains a maximum of 20 objects. |
Parameter |
Type |
Description |
---|---|---|
metric |
metric object |
Metrics |
dataPoints |
Array of dataPoints objects |
Key metrics |
Parameter |
Type |
Description |
---|---|---|
dimensions |
Array of dimensions objects |
Dimensions |
metricName |
String |
Metric name. Options:
|
namespace |
String |
Metric namespace. Options:
|
Parameter |
Type |
Description |
---|---|---|
name |
String |
Metric dimension name |
value |
String |
Metric dimension value |
Parameter |
Type |
Description |
---|---|---|
timestamp |
Integer |
Timestamp |
unit |
String |
Time series unit |
statistics |
Array of statistics objects |
List of statistical values |
Parameter |
Type |
Description |
---|---|---|
statistic |
String |
Statistical mode. Options:
|
value |
Float |
Statistical result. The value -1 indicates invalid data. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Obtain the monitored resource pool information.
GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/monitor { }
Example Responses
Status code: 200
OK
{ "metrics" : [ { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "cpuUsage", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 7.944 } ] }, { "timestamp" : 1655197200000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 7.88 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "memUsedRate", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 13.83 } ] }, { "timestamp" : 1655197200000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 13.836 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "gpuUtil", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : -1 } ] }, { "timestamp" : 1655197200000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : -1 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "gpuMemUsage", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : -1 } ] }, { "timestamp" : 1655197200000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : -1 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "npuUtil", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "", "statistics" : [ { "statistic" : "average", "value" : -1 } ] }, { "timestamp" : 1655197200000, "unit" : "", "statistics" : [ { "statistic" : "average", "value" : -1 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "npuMemUsage", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "", "statistics" : [ { "statistic" : "average", "value" : -1 } ] }, { "timestamp" : 1655197200000, "unit" : "", "statistics" : [ { "statistic" : "average", "value" : -1 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "diskAvailableCapacity", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Megabytes", "statistics" : [ { "statistic" : "average", "value" : 834383.4 } ] }, { "timestamp" : 1655197200000, "unit" : "Megabytes", "statistics" : [ { "statistic" : "average", "value" : 834379.2 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "diskCapacity", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Megabytes", "statistics" : [ { "statistic" : "average", "value" : 1105920 } ] }, { "timestamp" : 1655197200000, "unit" : "Megabytes", "statistics" : [ { "statistic" : "average", "value" : 1105920 } ] } ] }, { "metric" : { "dimensions" : [ { "name" : "clusterId", "value" : "83df17f1-d74c-11ec-a070-0255ac1000c3" } ], "metricName" : "diskUsedRate", "namespace" : "PAAS.AGGR" }, "dataPoints" : [ { "timestamp" : 1655193600000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 24.553 } ] }, { "timestamp" : 1655197200000, "unit" : "Percent", "statistics" : [ { "statistic" : "average", "value" : 24.553 } ] } ] } ] }
Status code: 404
Not found.
{ "error_code" : "ModelArts.50015001", "error_msg" : "pool not found" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
404 |
Not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.