本接口用于查询相关云产品或功能的监控数据。
目前支持查询的产品或功能包括:边缘实例、弹性公网 IP、四层负载均衡、七层负载均衡、NAT 网关、文件存储、云盘、边缘函数、边缘容器和边缘托管。
系统存储最近90天的监控数据。在单次查询中,您最多可以查询90天存储时长内任意连续31天的数据。
如果您指定了多个筛选条件,系统会进行取交集查询,即查询满足所有筛选条件的监控数据。
指定的时间范围不同,展示的数据点之间的时间间隔也会相应调整:
指定的时间范围 | 展示的数据点之间的时间间隔 |
---|---|
(0,6]小时 | 30 秒 |
(6,12]小时 | 1 分钟 |
(12,24]小时 | 2 分钟 |
(1,2]天 | 5 分钟 |
(2,7]天 | 15 分钟 |
(7,30]天 | 1 小时 |
(30,31] 天 | 3 小时 |
下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeMetricData | 公共参数。该参数表示接口名称。取值:DescribeMetricData。 |
Version | String | 是 | 2021-04-30 | 公共参数。该参数表示接口版本。取值:2021-04-30。 |
category | String | 是 | EIP | 监控指标类别:
详情请参见监控指标中的 category。 说明 对于文件存储功能,您需要先开通权限后才能查询相关数据。 |
dimensions | String | 否 | {"instances": ["36.**.**.190"]} | 查询维度。该参数值使用 JSON 字符串形式。 |
metric_name | String | 是 | network_io | 监控指标名称。详情请参见监控指标中的 metric_id。 |
start_time | Integer | 是 | 1638085378 | 查询起始时间,以 UNIX 时间戳格式显示。UNIX 时间戳表示的是从 1970 年 1 月 1 日 (UTC/GMT 的午夜)开始所经过的秒数。 |
end_time | Integer | 是 | 1638171778 | 查询结束时间,以 UNIX 时间戳格式显示。UNIX 时间戳表示的是从 1970 年 1 月 1 日 (UTC/GMT 的午夜)开始所经过的秒数。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
metric | Map[String]String |
| 监控指标信息。 |
data | []DataPair |
| 监控数据。 |
peak | Float64 | 1 | 数据峰值。 |
peak_timestamp | Integer | 1691949691 | 数据峰值发生时的时间戳,单位:毫秒。 |
unit | String | bps | 单位。详情请参见监控指标中的 unit。 |
period | String | 15 | 数据统计周期,即采集的数据点之间的时间间隔。 |
GET https://veenedge.volcengineapi.com/?Action=DescribeMetricData&Version=2021-04-30 &start_time=1691990070 &end_time=1691993670 &category=EIP &metric_name=network_io &dimensions={"instances":["122.**.**.176"]} &<其他公共参数>
{ "ResponseMetadata":{ "RequestId":"20230814141433D87D5C35931FA4A0****", "Action":"DescribeMetricData", "Version":"2021-04-30", "Service":"veenedge", "Region":"cn-north-1" }, "Result":{ "result":[ { "metric":{ "metric_id":"network_rx_io" }, "data":[ { "value":229.5876049235261, "timestamp":1691990070000, "is_loss":false }, { "value":92.7997348579004, "timestamp":1691990085000, "is_loss":false }, { "value":92.7997348579004, "timestamp":1691990100000, "is_loss":false }, { "value":93.40182800720528, "timestamp":1691990115000, "is_loss":false }, { "value":93.40182800720528, "timestamp":1691990130000, "is_loss":false }, { "value":362.86948080206207, "timestamp":1691990145000, "is_loss":false }, { "value":362.86948080206207, "timestamp":1691990160000, "is_loss":false }, { "value":686.2158388190704, "timestamp":1691990175000, "is_loss":false }, { "value":686.2158388190704, "timestamp":1691990190000, "is_loss":false }, { "value":478.97258450891667, "timestamp":1691990205000, "is_loss":false }, { "value":478.97258450891667, "timestamp":1691990220000, "is_loss":false }, { "value":153.330330781164, "timestamp":1691990235000, "is_loss":false }, { "value":153.330330781164, "timestamp":1691990250000, "is_loss":false }, { "value":19.99966667222213, "timestamp":1691990265000, "is_loss":false }, { "value":19.99966667222213, "timestamp":1691990280000, "is_loss":false }, { "value":151.731314724987, "timestamp":1691990295000, "is_loss":false }, { "value":151.731314724987, "timestamp":1691990310000, "is_loss":false }, { "value":150.6290094143131, "timestamp":1691990325000, "is_loss":false }, { "value":150.6290094143131, "timestamp":1691990340000, "is_loss":false }, { "value":19.8425821813612, "timestamp":1691990355000, "is_loss":false }, { "value":19.8425821813612, "timestamp":1691990370000, "is_loss":false }, { "value":0, "timestamp":1691990385000, "is_loss":false }, { "value":0, "timestamp":1691990400000, "is_loss":false }, { "value":0, "timestamp":1691990415000, "is_loss":false }, { "value":0, "timestamp":1691990430000, "is_loss":false }, { "value":438.4803880711464, "timestamp":1691990445000, "is_loss":false }, { "value":438.4803880711464, "timestamp":1691990460000, "is_loss":false }, { "value":860.6356968215159, "timestamp":1691990475000, "is_loss":false } } ], "peak":860.6356968215159, "peak_timestamp":1691990475000, "unit":"bps", "period":15 }, { "metric":{ "metric_id":"network_tx_io" }, "data":[ { "value":229.5876049235261, "timestamp":1691990070000, "is_loss":false }, { "value":92.7997348579004, "timestamp":1691990085000, "is_loss":false }, { "value":92.7997348579004, "timestamp":1691990100000, "is_loss":false }, { "value":93.40182800720528, "timestamp":1691990115000, "is_loss":false }, { "value":93.40182800720528, "timestamp":1691990130000, "is_loss":false }, { "value":362.86948080206207, "timestamp":1691990145000, "is_loss":false }, { "value":362.86948080206207, "timestamp":1691990160000, "is_loss":false }, { "value":686.2158388190704, "timestamp":1691990175000, "is_loss":false }, { "value":686.2158388190704, "timestamp":1691990190000, "is_loss":false }, { "value":419.21746073995206, "timestamp":1691990205000, "is_loss":false }, { "value":419.21746073995206, "timestamp":1691990220000, "is_loss":false }, { "value":93.4127341573671, "timestamp":1691990235000, "is_loss":false }, { "value":93.4127341573671, "timestamp":1691990250000, "is_loss":false }, { "value":19.99966667222213, "timestamp":1691990265000, "is_loss":false }, { "value":19.99966667222213, "timestamp":1691990280000, "is_loss":false }, { "value":151.731314724987, "timestamp":1691990295000, "is_loss":false }, { "value":151.731314724987, "timestamp":1691990310000, "is_loss":false }, { "value":150.6290094143131, "timestamp":1691990325000, "is_loss":false }, { "value":150.6290094143131, "timestamp":1691990340000, "is_loss":false }, { "value":19.8425821813612, "timestamp":1691990355000, "is_loss":false }, { "value":19.8425821813612, "timestamp":1691990370000, "is_loss":false }, { "value":0, "timestamp":1691990385000, "is_loss":false }, { "value":0, "timestamp":1691990400000, "is_loss":false }, { "value":0, "timestamp":1691990415000, "is_loss":false }, { "value":0, "timestamp":1691990430000, "is_loss":false }, { "value":431.279067829102, "timestamp":1691990445000, "is_loss":false }, { "value":431.279067829102, "timestamp":1691990460000, "is_loss":false }, { "value":853.4012124459925, "timestamp":1691990475000, "is_loss":false } ], "peak":853.4, "peak_timestamp":1691990475000, "unit":"bps", "period":15 } ] } }
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码。