最近更新时间:2024.04.17 17:39:50
首次发布时间:2024.04.03 17:37:05
调用MiniProAlarmHistory获取指定任务的报警历史。
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 接口名称。当前 API 的名称为 |
Version | String | 是 |
| 接口版本。当前 API 的版本为 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
common | Object of Common | 是 |
| 通用参数。 |
time_filter | Object of Time_filter | 是 |
| 时间区间。 |
id | Long | 否 |
| 报警任务ID列表。 |
page_size | Integer | 否 |
| 报警历史列表返回项数。 |
page_num | Integer | 否 |
| 报警历史列表页数。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
aid | Long | 是 |
| 应用ID。 |
os | String | 否 |
| 服务类型。取值支持app、webpro、minipro。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
start_time | Integer | 是 |
| 起始时间。 |
granularity | Integer | 否 |
| 聚合时间粒度。 |
end_time | Integer | 是 |
| 终止时间。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | Object of Data |
| 返回数据。 |
error_msg | String |
| 错误信息。 |
error_no | Integer |
| 错误码。0为成功。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
alarm_histories | Array of Alarm_histories |
| 报警历史详情。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | Long |
| 报警历史ID。 |
alarm_param | Object of Alarm_param |
| 报警参数。 |
alarm_time | Long |
| 报警发生时间。 |
alarm_content | String |
| 报警内容。 |
alarm_result | Object of Alarm_result |
| 报警结果。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | Long |
| 报警任务ID。 |
name | String |
| 报警任务名称。 |
desc | String |
| 报警说明。 |
is_close | Integer |
| 是否关闭报警。
|
category | String |
| 报警类型。 |
category_label | String |
| 报警类型名称。 |
alarm_level | String |
| 报警级别。
|
strategy_list | Array of Strategy_list |
| 报警策略列表。 |
strategy_op | String |
| 报警多策略关系。
|
interval_seconds | Integer |
| 报警任务执行间隔。
|
alarm_period | Object of Alarm_period |
| 报警生效时间。 |
notify_config | Object of Notify_config |
| 报警任务通知配置。 |
is_avoid_spike | Boolean |
| 是否屏蔽尖刺报警。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_alarm | Boolean |
| 是否报警。 |
strategy_result_list | Array of Strategy_result_list |
| 分策略报警结果。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | String |
| 报警ID。 |
measure | Object of Measure |
| 当前策略的指标集合,包括普通指标和复合指标。 |
filter_list | Array of Filter_list |
| 报警策略筛选条件。 |
alarm_strategy_type | String |
| 报警策略类型。
|
daily_compare_count | Integer |
| 上一周期与当前周期的时间间隔。 |
alarm_threshold | Double |
| 报警阈值。 |
threshold_cmp_op | String |
| 策略符号。
|
alarm_user_threshold | Double |
| 用户数阈值。 |
alarm_sample_threshold | Double |
| 样本数量阈值。 |
alarm_window_size | Long |
| 报警任务查询时间窗口,表示最近X分钟。单位为分钟。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
start_time | Integer |
| 报警生效开始时间。 |
end_time | Integer |
| 报警生效结束时间。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
notify_types | Array of String |
| 报警任务通知方式。
|
notify_lark_webhooks | Array of String |
| 飞书通知webhook列表。 |
notify_groups | Array of Long |
| 邮件接收组id列表 |
notify_wechat_webhooks | Array of String |
| 企业微信通知webhook列表。 |
notify_dingding_webhooks | Array of String |
| 钉钉通知webhook列表。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_alarm | Boolean |
| 是否满足策略条件。 |
title | String |
| 查询结果的标题。 |
is_attributable | Boolean |
| 是否归因。 |
group_result_list | Array of Group_result_list |
| 分组报警结果。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | String |
| 指标类型。
|
raw_measure_list | Array of Raw_measure_list |
| 报警指标列表。 |
formula | String |
| 指标四则运算公式。 |
name | String |
| 指标名。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
op | String |
| 条件符号。
|
filter_name | String |
| 筛选条件key。调用 |
values | Array of String |
| 筛选条件值。调用 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_alarm | Boolean |
| 是否报警。 |
group_value | String |
| 分组报警取值,比如国家分组的中国,如果不是分组报警则不返回。 |
alarm_tag_list | Array of Alarm_tag_list |
| 报警列表标签。 |
is_spike | Boolean |
| 是否尖刺过滤。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
measure_name | String |
| 简单指标key。 |
filter_list | Array of Filter_list |
| 筛选条件。当指标类型为复合指标时单个简单指标携带条件时选填。 |
event_name | String |
| 自定义事件key。当指标为自定义事件指标时必填。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
label | String |
| 指标。 |
value | Double |
| 当前指标的取值。 |
format_value | String |
| 格式化后的值。 |
POST ?Action=MiniProAlarmHistory&Version=2024-03-12 { "common": { "aid": 12345, "os": "minipro" }, "id": 302, "time_filter": { "start_time": 1665849600, "end_time": 1666011403, "granularity": 3600 }, "page_size": 10, "page_num": 1 }
{ "err_detail":"", "data":{ "alarm_histories":[ { "id":160570, "alarm_param":{ "id":302, "name":"test", "desc":"", "is_close":0, "category":"performance", "category_label":"", "alarm_level":"warning", "strategy_list":[ { "id":"123-456", "measure":{ "type":"monomial", "raw_measure_list":[ { "measure_name":"slow_load_count", "filter_list":[ ], "event_name":"" } ], "formula":"", "name":"慢页面次数" }, "filter_list":[ ], "alarm_strategy_type":"threshold", "daily_compare_count":5, "alarm_threshold":0, "threshold_cmp_op":"gte", "alarm_user_threshold":0, "alarm_sample_threshold":0, "alarm_window_size":180, "sample_metric":{ "type":"monomial", "raw_measure_list":[ { "measure_name":"browser_perf.count", "filter_list":[ ] } ], "formula":"", "name":"count" }, "user_metric":{ "type":"monomial", "raw_measure_list":[ { "measure_name":"browser_perf.user", "filter_list":[ ] } ], "formula":"", "name":"user" } } ], "strategy_op":"and", "interval_seconds":300, "alarm_period":{ "start_time":0, "end_time":86399 }, "notify_config":{ "notify_types":[ "mail" ], "notify_groups":[ 287 ] }, "is_avoid_spike":false, "aid":123456, "os":"minipro" }, "alarm_time":1666011480, "alarm_content":"\n最近180分钟慢页面次数阈值>=0 \n 当前值:1174 阈值:0 样本量:10745 用户数:458 时间窗口:180分钟\n", "alarm_result":{ "is_alarm":true, "strategy_result_list":[ { "is_alarm":true, "title":"慢页面次数阈值报警", "is_attributable":false, "group_result_list":[ { "is_alarm":true, "group_value":"", "alarm_tag_list":[ { "label":"当前值", "value":1174, "format_value":"1174" }, { "label":"阈值", "value":0, "format_value":"0" }, { "label":"样本量", "value":10745, "format_value":"10745" }, { "label":"用户数", "value":458, "format_value":"458" }, { "label":"时间窗口", "value":180, "format_value":"3 分钟" } ], "alarm_value":{ "current_value":{ "label":"当前值", "value":1174, "format_value":"" }, "alarm_threshold":{ "label":"阈值", "value":0, "format_value":"0" }, "sample_count":{ "label":"样本量", "value":10745, "format_value":"10745" }, "user_count":{ "label":"用户数", "value":458, "format_value":"458" }, "window_size":{ "label":"时间窗口", "value":180, "format_value":"3 分钟" } }, "is_spike":false } ] } ] }, "operator":"bytedance-apm", "detail_link":"/apmplus/minipro/data_search?aid=123456&end_time=1666011480&ev_type=view&start_time=1666000680" } ], "count":1265 }, "error_msg":"", "error_no":0 }