最近更新时间:2023.08.03 10:10:58
首次发布时间:2022.11.18 17:53:52
调用GetAppAlarmHistory接口获取App报警历史。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 请求名称。 |
Version | String | 是 |
| 请求版本。 |
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
aid | i64 | 是 |
| 应用ID。 |
filters | object of Filter | 否 | - | 过滤条件。 |
start_time | i64 | 是 |
| 开始时间 |
end_time | i64 | 是 |
| 终止时间。 |
query_key | string | 否 |
| 报警事件名模糊搜索,不填默认全部。 |
page_size | i64 | 否 |
| 分页条数,不传默认10。 |
page_no | i64 | 否 |
| 起始页码为1。 |
monitor_types | array of string | 否 |
| 监控类型。
|
order_by | string | 否 | - | 排序方式,默认按报警时间倒序排列。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
type | string | 否 |
| 筛选条件类型。
|
op | string | 否 |
| 操作符
|
dimension | string | 否 |
| 条件的名称。 |
values | array of string | 否 |
| 筛选值,支持多个。 |
value | string | 否 |
| 筛选值。 |
map_key | string | 否 |
| map类型key,当type为map时必填。 |
sub_conditions | array of Filter | 否 | - | 子条件。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | array of data | - | 报警历史。 |
error_msg | string | - | 错误信息,成功为空。 |
error_no | i64 |
| 错误码,成功为0。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | array of Data | - | 报警历史。 |
total_cnt | i64 | - | 总条数。 |
total_page | i64 | - | 总页数。 |
curr_page | i64 | - | 当前页码。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | i64 |
| 报警ID。 |
rule_id | i64 |
| 报警任务ID。 |
rule_name | string |
| 报警名称。 |
occur_time | string | - | 报警事件发生时间。 |
notify_content | string | - | 报警内容。 |
alarm_level | string | - | 报警级别。
|
notify_types | array of string |
| 通知方式 |
handle_status | i64 | - | 处理状态。 |
ack_status | i64 |
| ACK状态。
|
ack_time | string | - | ACK时间。 |
url | string | - | 链接。 |
operators | array of string | - | 报警创建人ID列表。 |
operators_info | array of OperatorsInfo | - | 报警创建人具体信息。 |
filter_info | object of FilterInfo | - | 报警任务条件。 |
monitor_type | string |
| 监控类型。
|
hit_rule | object of HitRule | - | 报警任务规则配置。 |
rule_brief | string | - | 报警事件对应的规则的简述。 |
alarm_receives | array of AlarmReceive | - | 报警邮件接收组信息。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | i64 |
| 用户ID。 |
username | string |
| 用户名称。 |
string |
| 用户邮箱。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 条件类型。
|
dimension | string |
| 条件的名称。 |
op | string |
| 操作符。
|
value | string |
| 筛选值。 |
values | array of string |
| 筛选值,支持多个。 |
sub_conditions | array of FilterInfo | - | 子条件。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 条件类型。
|
hit_rule_type | string |
| 规则类型。
|
threshold_calculate_type | string | - | 阈值计算方式,是纯做加减还是做百分比。 |
threshold_value | double |
| 报警阈值。 |
op | string |
| 比较符。
|
indicator | object of Indicator | - | 阈值类型参数配置。 |
indicators | array of Indicator | - | 同环比类型参数配置。 |
sub_hit_rules | array of HitRule | - | 子规则。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_group | boolean |
| 是否接收组。 |
user_name | string |
| 单个用户的用户名。 |
string |
| 用户邮箱。 | |
group_name | string |
| 群组接收组名。 |
group_id | i32 |
| 接收组ID。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
name | string |
| 指标定义名称,由 |
value | double |
| 指标值。 |
recently | i64 |
| 指标查询时间范围 ,比如180min。 |
compare_time | i64 |
| 比较时间。
|
start_time | i64 | - | 统计开始时间。 |
end_time | i64 | - | 统计结束时间。 |
POST https://open.volcengineapi.com/?Action=GetAppAlarmHistory&Version=2022-10-12 { "aid":123456, "start_time":1679155200, "end_time":1679295939, "filters":{ "type":"and", "sub_conditions":[ { "dimension":"rule_id", "type":"expression", "op":"in", "values":[ "717" ] } ] }, "query_key":"", "monitor_types":[ "crash" ], "page_no":1, "page_size":1 }
{ "err_detail": "", "data": { "data": [ { "id": 12345, "rule_id": 717, "rule_name": "测试报警0401", "occur_time": "2023-02-13 11:56:48", "notify_content": "分组1:操作系统名称:Android\n崩溃次数最近180分钟内>=1,当前值5\n任务间隔:5分钟\n筛选条件:\n", "alarm_level": "fatal", "notify_types": [ "lark" ], "handle_status": 0, "ack_status": 0, "ack_time": "2022-04-27 23:57:13", "operators": [ "1" ], "operators_info": [ { "id": 1, "username": "admin-1", "display_name": "admin-1", "email": "", "head_url": "", "sso_user_id": "", "auth_level": "admin", "title": "" } ], "filter_info": { "type": "and", "dimension": "", "op": "", "sub_conditions": [ { "type": "expression", "dimension": "aid", "op": "in", "values": [ "123456" ] } ] }, "rule_brief": "任务间隔:5分钟\n筛选条件:\n报警分组:操作系统名称\n最近180分钟内,崩溃次数 阈值>=1", "monitor_type":"crash", "hit_rule": { "type": "and", "hit_rule_type": "", "threshold_calculate_type": "", "threshold_value": 0, "op": "", "sub_hit_rules": [ { "type": "expression", "hit_rule_type": "threshold", "indicator": { "name": "crash_count", "recently": 180, "compare_time": 0 }, "threshold_calculate_type": "", "threshold_value": 1, "op": "gte", "hit_metric": [] } ], "hit_metric": [] } } ], "total_cnt": 312, "total_page": 312, "curr_page": 1 }, "error_msg": "", "error_no": 0 }
{ "ResponseMetadata": { "RequestId": "20180*****2D30", "Action": "GetAppAlarmHistory", "Version": "2022-10-12", "Service": "***", "Region": "cn-north-1", "Error": { "Code": "200000", "Message": "参数异常" } } }