最近更新时间:2023.07.03 16:32:39
首次发布时间:2022.02.25 18:58:32
本接口用于获取负载均衡实例的监控趋势。
GET
下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数。
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryMetric | 公共参数。该参数表示接口名称。取值:QueryMetric。 |
Version | String | 是 | 2021-04-30 | 公共参数。该参数表示接口版本。取值:2021-04-30。 |
start_time | Integer | 是 | 1638106336 | 查询的起始时间,UNIX 时间戳格式。 |
end_time | Integer | 是 | 1638279136 | 查询的结束时间,UNIX 时间戳格式。 |
lb_ids | String | 是 | veew-lb2131011027612112**** | 负载均衡实例的 ID。ID 之间用半角逗号(,) 分隔。您可以通过 ListLBs 接口查询负载均衡实例的 ID。 |
scope_type | Integer | 是 | 0 | 查询范围。取值范围:
|
metric_type | Integer | 是 | 0 | Metric 类别。取值范围:
|
listener_uniq_list | String | 否 | 3f920c4f9be67af91f9ec106931a**** | 监听器的 uniq 值。uniq 值之间用半角逗号(,) 分隔。您可以通过 ListLBListeners 接口查询监听器的 uniq 值。 |
无
GET https://veenedge.volcengineapi.com/?Action=QueryMetric&Version=2021-04-30 &start_time=1685524005 &end_time=11685524085 &lb_ids=veew-lb1047700072022322**** &scope_type=0 &metric_type=0 &<其他公共参数>
{ "ResponseMetadata": { "RequestId": "2023053117141294BAB2CDA9751EAF****", "Action": "QueryMetric", "Version": "2021-04-30", "Service": "veenedge", "Region": "cn-north-1" }, "Result": [ { "metrics": {}, "data": [ { "value": 1, "timestamp": 1685524005000 }, { "value": 1, "timestamp": 1685524020000 }, { "value": 1, "timestamp": 1685524035000 }, { "value": 1, "timestamp": 1685524050000 }, { "value": 1, "timestamp": 1685524065000 }, { "value": 1, "timestamp": 1685524080000 } ], "max": 1, "max_timestamp": 1685524005000 } ] }
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码。