资源池监控
功能介绍
获取资源池的监控信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/{project_id}/pools/{pool_name}/monitor
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
用户项目ID。获取方法请参见获取项目ID和名称。 |
pool_name |
是 |
String |
系统生成的资源池名称。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
time_range |
否 |
String |
查询时间范围,默认值“-1.-1.60”。格式为startTimeInMillis.endTimeInMillis.durationInMinutes,参数解释:
|
statistics |
否 |
String |
统计方式。可选值如下:
|
period |
否 |
String |
监控数据粒度,单位为秒。可选值如下:
|
请求参数
无
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
metrics |
Array of metrics objects |
指标对象列表。 取值范围 JSON数组大小不超过20。 |
参数 |
参数类型 |
描述 |
---|---|---|
dimensions |
Array of dimensions objects |
指标维度列表。 |
metricName |
String |
指标名称。 |
namespace |
String |
指标命名空间。可选值如下:
|
参数 |
参数类型 |
描述 |
---|---|---|
timestamp |
Integer |
时间戳。 |
unit |
String |
时间序列单位。 |
statistics |
Array of statistics objects |
统计值列表。 |
状态码: 404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
ModelArts错误码。 |
error_msg |
String |
具体错误信息。 |
请求示例
查询资源池监控信息。
GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/monitor { }
响应示例
状态码: 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 } ] } ] } ] }
状态码: 404
Not Found。
{ "error_code" : "ModelArts.50015001", "error_msg" : "pool not found" }
状态码
状态码 |
描述 |
---|---|
200 |
OK。 |
404 |
Not Found。 |
错误码
请参见错误码。