更新时间:2023.04.10 16:07:03
调用GetAppAlarmRuleList接口获取App报警任务列表。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 请求名称。 |
Version | String | 是 |
| 请求版本。 |
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
aid | i64 | 否 |
| 应用ID。 |
rule_id | i64 | 否 |
| 报警任务ID。 |
monitor_types | array of string | 否 |
| 监控类型。
|
status | array of string | 否 |
| 任务状态。
|
query_key | string | 否 |
| 搜索关键字,可按配置,接收组关键字搜索。 |
page_size | i64 | 否 |
| 分页条数 ,不传默认10。 |
page_no | i64 | 否 |
| 起始页码为1。 |
self | i8 | 否 |
| 是否只查看自己创建的规则。
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | object of data | - | 报警任务列表。 |
error_msg | string | - | 错误信息,成功为空。 |
error_no | i32 |
| 错误码,成功为0。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | array of Data | - | 报警任务。 |
total_cnt | i64 |
| 总条数 |
total_page | i64 |
| 总页数。 |
curr_page | i64 |
| 当前页码。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | i64 |
| 报警规则ID。如果是新建的可以不传。 |
name | string |
| 规则名称。 |
description | string |
| 规则描述。 |
monitor_type | string |
| 监控类型。
|
alarm_level | string |
| 报警级别。
|
check_cycle | i64 |
| 监测周期,单位为分钟,瞬时报警请填0。 |
activation_start | string |
| 全天生效时间起点,24h制,精确到分。 |
activation_end | string |
| 全天生效时间终点,24h制,精确到分。 |
activations | array of Activation | - | 多个时间段。 |
status | i8 |
| 报警状态。
|
filter | object of Filter | - | 报警指标筛选条件。 |
group_bys | array of GroupBy | - | 报警分组条件。 |
hit_rule | object of HitRule | - | 报警触发条件。 |
notice_conf | object of NoticeConf | - | 通知配置信息。 |
brief | string |
| 概述信息。 |
count | i64 |
| 报警次数。 |
update_at | string |
| 更新事件的时间,格式为“yyyy-MM-dd HH:mm:ss”。 |
recently_occur_time | string |
| 最近发生时间,没有为空字符串。 |
ack_time | string |
| ACK时间。 |
ack_status | i8 |
| ACK状态。
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
activation_start | string |
| 生效时间起点。 |
activation_end | string |
| 生效时间终点。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 条件类型。
|
dimension | string |
| 条件的名称。 |
op | string |
| 操作符。
|
value | string |
| 筛选值。 |
values | array of string |
| 筛选值,支持多个。 |
sub_conditions | array of Filter | - | 子条件。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
dimension | string |
| 分组名称。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
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 | - | 子规则。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | array of string |
| 通知类型。
|
lark_web_hooks | array of string | - | 增加飞书的webhook链接配置项。 |
dingding_web_hooks | array of string | - | 钉钉webhook。 |
wechat_web_hooks | array of string | - | 微信webhook。 |
alarm_receives | array of AlarmReceive | - | 接收组。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
name | string |
| 指标定义名称,由 |
value | double |
| 指标值。 |
recently | i64 |
| 指标查询时间范围,比如180min。 |
compare_time | i64 |
| 比较时间。
|
start_time | i64 | - | 统计起止时间。 |
end_time | i64 | - | 统计起止时间。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_group | boolean |
| 是否接收组。 |
user_name | string | - | 单个用户。 |
string | - | 群组。 | |
group_name | string | - | 群组名。 |
group_id | i32 |
| 接收组ID。 |
POST https://open.volcengineapi.com/?Action=GetAppAlarmRuleList&Version=2022-10-12 { "monitor_types":[ "crash" ], "query_key":"测试报警", "status":[ ], "page_no":1, "page_size":1 }
{ "err_detail": "", "data": { "data": [ { "id": 717, "name": "测试报警0401", "monitor_type": "crash", "alarm_level": "fatal", "check_cycle": 5, "activations": [ { "activation_start": "00:00", "activation_end": "23:59", "activation_start_stamp": 1541174400, "activation_end_stamp": 1541260740 } ], "activation_start": "08:00", "activation_end": "08:00", "status": 1, "callback_url": "", "filter": { "type": "and", "dimension": "", "op": "", "sub_conditions": [ { "type": "expression", "dimension": "aid", "op": "in", "values": [ "187277" ] } ] }, "group_bys": [ { "dimension": "os" } ], "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": [] }, "notice_conf": { "type": [ "lark" ], "lark_web_hooks": [ "https://open.feishu.cn/open-apis/bot/v2/hook/2a8f94c8-2d7d-4a37-8978-db571bebb558" ], "dingding_web_hooks": [], "wechat_web_hooks": [] }, "brief": "任务间隔:5分钟\n筛选条件:\n报警分组:操作系统名称\n最近180分钟内,崩溃次数 阈值>=1", "count": 84947, "update_at": "2023-03-09 13:11:40", "recently_occur_time": "2023-03-20 10:28:53", "ack_status": 0, "ack_time": "2023-03-02 09:43:21" } ], "total_cnt": 10, "total_page": 10, "curr_page": 1 }, "error_msg": "", "error_no": 0 }
{ "ResponseMetadata": { "RequestId": "201806*****2D30", "Action": "GetAppAlarmRuleList", "Version": "2022-10-12", "Service": "***", "Region": "cn-north-1", "Error": { "Code": "200000", "Message": "参数异常" } } }