调用DescribeContainerGroupMetric查询一个ECI的监控信息。
接口说明
- 目前最多支持返回50条监控数据,超过了将会报错。
- 目前仅支持5分钟以内的实时数据和5分钟之前的历史数据的分开查询,如果查询时间段跨越了这个时间点,默认只获取5分钟之前的历史数据。
- 目前仅支持创建时间晚于北京时间2019年4月3日15:00的ECI支持监控数据的查询。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 否 | DescribeContainerGroupMetric |
系统规定参数,取值:DescribeContainerGroupMetric。 |
ContainerGroupId | String | 是 | eci-bp17da5olmkuagfrzurh |
容器组实例ID。 |
RegionId | String | 是 | cn-hangzhou |
实例所属的地域ID。 |
StartTime | String | 否 | 2019-03-12T01:00:00.000Z |
默认值为EndTime
String Rfc3339时间格式。 |
EndTime | String | 否 | 2019-09-12T01:00:00.000Z |
默认值为当前时间。String Rfc3339时间格式 |
Period | String | 否 | 15 |
目前只支持15、30、60、600(S)等四个聚合周期。默认为60(S)。 如果StartTime和EndTime均没有填写,则默认获取最新5分钟的监控数据,默认聚合周期为15S,传入的Period将被忽略。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC |
请求ID,唯一标识。 |
ContainerGroupId | String | eci-bp1dqpye03ke5s6p2ijc |
容器组ID。 |
Records | Array |
监控信息详情。 |
|
Timestamp | String | 2019-03-29T10:38:50.734+08:00 |
每条监控数据对应的统计的时间 |
Containers | Array |
容器列表信息。 |
|
Name | String | u1 |
容器名称。 |
CPU | Struct |
CPU信息。 |
|
UsageNanoCores | Long | 0 |
节点上所有CPU在采样窗口内的使用量。 |
UsageCoreNanoSeconds | Long | 40876694 |
节点上所有CPU历史使用总量。 |
Load | Long | 0 |
负载情况。 |
Limit | Long | 1024 |
CPU上限。 |
Memory | Struct |
内存信息。 |
|
AvailableBytes | Long | 4285091840 |
可用内存。 |
UsageBytes | Long | 9289728 |
已使用内存。 |
Cache | Long | 9289728 |
缓存。 |
WorkingSet | Long | 9289728 |
目前消耗的物理内存。 |
Rss | Long | 9289728 |
实际使用物理内存。 |
CPU | Struct |
CPU信息。 |
|
UsageNanoCores | Long | 0 |
节点上所有CPU在采样窗口内的使用量。 |
UsageCoreNanoSeconds | Long | 40876694 |
节点上所有CPU历史使用总量。 |
Load | Long | 0 |
负载情况。 |
Limit | Long | 1024 |
CPU使用上限。 |
Memory | Struct |
内存信息。 |
|
AvailableBytes | Long | 4285091840 |
可用内存。 |
UsageBytes | Long | 9289728 |
已使用内存。 |
Cache | Long | 9289728 |
缓存。 |
WorkingSet | Long | 9289728 |
目前消耗的物理内存。 |
Rss | Long | 9289728 |
实际使用物理内存。 |
Network | Struct |
网络状态信息 |
|
Interfaces | Array |
网卡信息 |
|
TxBytes | Long | 426 |
发送字节数 |
RxBytes | Long | 0 |
接收字节数 |
TxErrors | Long | 0 |
发送错误数 |
RxErrors | Long | 0 |
接收错误数 |
Name | String | eth0 |
网卡名称 |
示例
请求示例
http(s)://eci.aliyuncs.com/?Action=DescribeContainerGroupMetric
&ContainerGroupId=eci-123456
&RegionId=cn-hangzhou
&<公共请求参数>
正常返回示例
XML
格式
<DescribeContainerGroupMetricResponse>
<ContainerGroupId>eci-bp1dqpye03ke5s6p2ijc</ContainerGroupId>
<Records>
<Containers>
<Name>redis-liu</Name>
<Memory>
<AvailableBytes>2145820672</AvailableBytes>
<UsageBytes>1662976</UsageBytes>
</Memory>
<CPU>
<Load>0</Load>
<UsageNanoCores>0</UsageNanoCores>
<UsageCoreNanoSeconds>40876694</UsageCoreNanoSeconds>
<Limit>1024</Limit>
</CPU>
</Containers>
<Containers>
<Name>nginx-liu</Name>
<Memory>
<AvailableBytes>2145325056</AvailableBytes>
<UsageBytes>2166784</UsageBytes>
</Memory>
<CPU>
<Load>0</Load>
<UsageNanoCores>0</UsageNanoCores>
<UsageCoreNanoSeconds>43183279</UsageCoreNanoSeconds>
<Limit>1024</Limit>
</CPU>
</Containers>
<Memory>
<AvailableBytes>4285091840</AvailableBytes>
<UsageBytes>9289728</UsageBytes>
</Memory>
<Network>
<Interfaces>
<Name>eth0</Name>
<TxBytes>426</TxBytes>
<RxErrors>0</RxErrors>
<TxErrors>0</TxErrors>
<RxBytes>0</RxBytes>
</Interfaces>
</Network>
<CPU>
<Load>0</Load>
<UsageNanoCores>7735803</UsageNanoCores>
<UsageCoreNanoSeconds>122380547</UsageCoreNanoSeconds>
<Limit>2048</Limit>
</CPU>
<Timestamp>2019-03-29T10:38:50.734+08:00</Timestamp>
</Records>
<Records>
<Containers>
<Name>nginx-liu</Name>
<Memory>
<AvailableBytes>2145488896</AvailableBytes>
<UsageBytes>2021376</UsageBytes>
</Memory>
<CPU>
<Load>0</Load>
<UsageNanoCores>0</UsageNanoCores>
<UsageCoreNanoSeconds>43183279</UsageCoreNanoSeconds>
<Limit>1024</Limit>
</CPU>
</Containers>
<Containers>
<Name>redis-liu</Name>
<Memory>
<AvailableBytes>2145910784</AvailableBytes>
<UsageBytes>1572864</UsageBytes>
</Memory>
<CPU>
<Load>0</Load>
<UsageNanoCores>287628</UsageNanoCores>
<UsageCoreNanoSeconds>44680652</UsageCoreNanoSeconds>
<Limit>1024</Limit>
</CPU>
</Containers>
<Memory></Memory>
<Network>
<Interfaces>
<Name>eth0</Name>
<TxBytes>143562</TxBytes>
<RxErrors>0</RxErrors>
<TxErrors>0</TxErrors>
<RxBytes>20410229</RxBytes>
</Interfaces>
</Network>
<CPU></CPU>
<Timestamp>2019-03-29T10:39:05.734+08:00</Timestamp>
</Records>
<RequestId>D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC</RequestId>
</DescribeContainerGroupMetricResponse>
JSON
格式
{
"ContainerGroupId": "eci-bp1dqpye03ke5s6p2ijc",
"Records": [
{
"Containers": [
{
"Name": "redis-liu",
"Memory": {
"AvailableBytes": 2145820672,
"UsageBytes": 1662976
},
"CPU": {
"Load": 0,
"UsageNanoCores": 0,
"UsageCoreNanoSeconds": 40876694,
"Limit": 1024
}
},
{
"Name": "nginx-liu",
"Memory": {
"AvailableBytes": 2145325056,
"UsageBytes": 2166784
},
"CPU": {
"Load": 0,
"UsageNanoCores": 0,
"UsageCoreNanoSeconds": 43183279,
"Limit": 1024
}
}
],
"Memory": {
"AvailableBytes": 4285091840,
"UsageBytes": 9289728
},
"Network": {
"Interfaces": [
{
"Name": "eth0",
"TxBytes": 426,
"RxErrors": 0,
"TxErrors": 0,
"RxBytes": 0
}
]
},
"CPU": {
"Load": 0,
"UsageNanoCores": 7735803,
"UsageCoreNanoSeconds": 122380547,
"Limit": 2048
},
"Timestamp": "2019-03-29T10:38:50.734+08:00"
},
{
"Containers": [
{
"Name": "nginx-liu",
"Memory": {
"AvailableBytes": 2145488896,
"UsageBytes": 2021376
},
"CPU": {
"Load": 0,
"UsageNanoCores": 0,
"UsageCoreNanoSeconds": 43183279,
"Limit": 1024
}
},
{
"Name": "redis-liu",
"Memory": {
"AvailableBytes": 2145910784,
"UsageBytes": 1572864
},
"CPU": {
"Load": 0,
"UsageNanoCores": 287628,
"UsageCoreNanoSeconds": 44680652,
"Limit": 1024
}
}
],
"Memory": {},
"Network": {
"Interfaces": [
{
"Name": "eth0",
"TxBytes": 143562,
"RxErrors": 0,
"TxErrors": 0,
"RxBytes": 20410229
}
]
},
"CPU": {},
"Timestamp": "2019-03-29T10:39:05.734+08:00"
}
],
"RequestId": "D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC"
}
错误码
访问错误中心查看更多错误码。