更新时间:2023.04.11 16:29:02
调用GetAlarmRelatedMetricTrend接口获取报警任务相关的指标趋势图。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 请求名称。 |
Version | String | 是 |
| 请求版本。 |
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
common | object of common | 是 | - | 通用参数。 |
id | int64 | 是 |
| 报警任务ID。 |
time_filter | object of time_filter | 是 | - | 时间区间。 |
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
aid | int64 | 是 |
| 应用ID。 |
os | string | 是 |
| 服务类型。 |
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
start_time | int32 | 是 |
| 起始时间。 |
end_time | int32 | 是 |
| 终止时间。 |
granularity | int32 | 是 |
| 聚合时间粒度。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
err_detail | string | - | 错误详情。 |
data | object of data | - | 返回内容。 |
error_msg | string | - | 错误信息。 |
error_no | int |
| 错误码。0为成功。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
metric_trends | object of metric_trends | - | 报警任务相关的指标趋势。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
fields | object of fields | - | 指标。 |
source | object |
| 与field对应的值。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
id | string |
| 报警时间,为source[i][0]值的含义。 |
dataType | string |
| 数据类型。 |
name | string |
| 指标名称。 |
POST https://open.volcengineapi.com/?Action=GetAlarmRelatedMetricTrend&Version=2022-10-12 { "common":{ "aid":312541, "os":"webpro" }, "id":302, "time_filter":{ "start_time":1665849600, "end_time":1666011403, "granularity":3600 } }
{ "err_detail":"", "data":{ "alarm_trend":{ "fields":[ { "id":"date", "dataType":"string", "name":"date" }, { "id":"慢页面次数阈值报警数", "dataType":"number", "name":"慢页面次数阈值报警数" } ], "source":[ [ "2022-10-12 00:00:00", "0", "10818" ], [ "2022-10-13 00:00:00", "156", "9232" ] ] } }, "error_msg":"", "error_no":0 }