更新时间:2023.04.11 16:29:02
调用GetAlarmAllHistory接口获取全部报警历史。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
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 | 是 | - | 时间区间。 |
page_size | int32 | 是 |
| 报警历史列表返回项数。 |
page_num | int32 | 是 |
| 报警历史列表页数。 |
category_list | array | 是 |
| 报警任务类别。不填时返回全部类别报警历史。调用 |
name_list | array | 是 |
| 报警任务名称列表。不填时返回全部名称报警历史。调用 |
level_list | array | 是 |
| 报警级别列表。不填时返回全部类型报警。
|
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
aid | int64 | 是 |
| 应用ID。 |
os | string | 是 |
| 服务类型。 |
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
start_time | int32 | 是 |
| 起始时间。 |
end_time | int32 | 是 |
| 终止时间。 |
granularity | int32 | 是 |
| 聚合时间粒度。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
err_detail | string | - | 错误详情。 |
data | object of data | - | 返回内容。 |
count | int |
| 报警数。 |
error_msg | string | - | 错误信息。 |
error_no | int |
| 错误码。0为成功。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
alarm_all_histories | array | - | 报警趋势。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
id | int |
| 报警历史ID。 |
alarm_param | object of alarm_param | - | 报警参数。 |
alarm_time | int |
| 报警时间。 |
alarm_content | array | - | 报警内容。 |
alarm_result | object of alarm_result | - | 报警结果。 |
ack_status | int |
| 是否ACK。 |
ack_until_time | int |
| ACK到期时间。 |
operator | string |
| 报警任务创建人。 |
detail_link | string |
| 报警详情链接。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
id | int |
| 报警任务ID。 |
name | string |
| 报警任务名。 |
desc | string | - | 报警说明。 |
is_close | int |
| 是否关闭报警。
|
category | string |
| 报警类型。 |
category_label | string | - | 报警类型筛选。 |
alarm_level | string |
| 报警级别。
|
strategy_list | object of strategy_list | - | 报警策略列表。 |
strategy_op | string |
| 报警多策略关系。
|
interval_seconds | int |
| 报警任务执行间隔。
|
alarm_period | object of alarm_period | - | 报警生效时间。时间范围外的报警不通知。 |
notify_config | object of notify_config | - | 报警任务通知配置。 |
is_avoid_spike | bool |
| 报警优化,是否过滤尖刺报警。 |
aid | int |
| 应用ID。 |
os | string |
| 服务类型。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
id | string |
| 报警ID。 |
measure | object of measure | - | 指标集合。 |
filter_list | array |
| 报警策略筛选条件。 |
alarm_strategy_type | string |
| 报警策略类型。
|
daily_compare_count | int |
| 上一周期与当前周期的时间间隔。 |
alarm_threshold | int |
| 报警阈值。 |
threshold_cmp_op | string |
| 策略符号。
|
alarm_user_threshold | int |
| 用户数阈值。 |
alarm_sample_threshold | int |
| 样本量阈值。 |
alarm_window_size | int |
| 报警任务查询时间窗口,表示最近X分钟。单位为分钟。 |
sample_metric | object of sample_metric | - | 示例指标。 |
user_metric | object of user_metric | - | 用户指标。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | object of raw_measure_list | - | 报警指标列表。 |
formula | string | - | 指标四则运算公式。 |
name | string |
| 指标名。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
measure_name | string |
| 简单指标key。 |
filter_list | array |
| 筛选条件。当指标类型为复合指标时单个简单指标携带条件时选填。 |
event_name | string | - | 自定义事件key。当指标为自定义事件指标时必填。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | object of raw_measure_list | - | 报警指标列表。 |
formula | string | - | 指标四则运算公式。 |
name | string |
| 指标名。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | object of raw_measure_list | - | 报警指标列表。 |
formula | string | - | 指标四则运算公式。 |
name | string |
| 指标名。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
notify_types | array |
| 报警任务通知方式。
|
notify_groups | int |
| 报警通知邮件组ID列表。 |
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
start_time | int32 | 是 |
| 报警生效开始时间。 |
end_time | int32 | 是 |
| 报警生效结束时间。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
is_alarm | bool |
| 是否报警。 |
strategy_result_list | object of strategy_result_list | - | 报警任务策略结果。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
is_alarm | bool |
| 是否满足策略条件。 |
title | string |
| 查询结果的标题。 |
is_attributable | bool |
| 是否归因。 |
group_result_list | object of group_result_list | - | 报警分组结果。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
is_alarm | bool |
| 是否报警。 |
group_value | string | - | 分组报警取值。 |
alarm_tag_list | object of alarm_tag_list | - | 报警列表标签。 |
alarm_value | object of alarm_value | - | 报警值。 |
is_spike | bool |
| 是否尖刺过滤。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
label | string |
| 指标。 |
value | int |
| 当前指标的取值。 |
format_value | string |
| 格式值。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
current_value | object of current_value | - | 当前值。 |
alarm_threshold | object | - | 报警阈值。 |
sample_count | object | - | 示例请求数。 |
user_count | object | - | 用户请求数。 |
window_size | object | - | 窗口大小。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
label | string |
| 指标。 |
value | int |
| 当前指标的取值。 |
format_value | string | - | 格式值。 |
POST https://open.volcengineapi.com/?Action=GetAlarmAllHistory&Version=2022-10-12 { "common":{ "aid":312541, "os":"webpro" }, "time_filter":{ "start_time":1665849600, "end_time":1666011403, "granularity":3600 }, "page_size":10, "page_num":1, "category_list":[ "pageview" ], "name_list":[ "111111111" ], "level_list":[ "warning" ] }
{ "err_detail":"", "data":{ "alarm_all_histories":[ { "id":160570, "alarm_param":{ "id":302, "name":"jiyi-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":"webpro" }, "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 } ] } ] }, "ack_status":1, "ack_until_time":1659611486, "operator":"bytedance-apm", "detail_link":"/apmplus/webpro/data_search?aid=123456&end_time=1666011480&ev_type=view&start_time=1666000680" } ], "count":1265 }, "error_msg":"", "error_no":0 }