最近更新时间:2023.08.04 11:51:24
首次发布时间:2022.11.15 20:38:48
调用PCAlarmDetail接口查看报警详情。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 请求名称。 |
Version | String | 是 |
| 请求版本。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
common | object of common | 否 | - | 通用参数。 |
id | i64 | 否 |
| 报警规则ID。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
aid | i64 | 是 |
| App ID。 |
env | string | 否 |
| 环境信息。 |
os | string | 是 |
| 系统。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | object of data | - | 返回内容。 |
errmsg | string |
| 错误信息,成功为空。 |
errno | i32 |
| 错误码,成功为 200。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
alarm_param | object of alarm_param | - | 报警参数。 |
created_by | string |
| 创建人。 |
updated_by | string |
| 更新人。 |
created_time | i64 |
| 创建时间。 |
updated_time | i64 |
| 更新时间。 |
next_trigger_time | i64 |
| 下次触发时间。 |
last_execute_time | i64 |
| 上次执行时间。 |
ack_until_time | i64 |
| ack到期时间。 |
num_of_alarm_in_last_one_month | i32 | - | 上个月触发次数。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | i64 |
| 创建时不传,更新时传。 |
name | string |
| 报警名称。 |
desc | string |
| 报警说明。 |
is_close | i8 |
| 是否关闭报警。
|
category | string |
| 报警类型。 |
category_label | string |
| 报警类型展示名称。 |
alarm_level | string |
| 报警级别。
|
strategy_list | array of strategy_list |
| 报警策略。 |
strategy_op | string |
| 多策略关系。
|
interval_seconds | i32 |
| 报警间隔,最短5分钟。 |
alarm_period | object of alarm_period | - | 报警时间。 |
notify_config | object of notify_config | - | 报警通知。 |
pct_avoid_spike | object of pct_avoid_spike | - | pct报警参数。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | string |
| 当新建报警策略的时候前端生成,用于后端画趋势图。 |
measure | object of measure | - | 指标集合。 |
filter_list | array of filter_list |
| 过滤条件。 |
alarm_strategy_type | string |
| 指标计算策略。
|
daily_compare_count | i32 |
| 同比支持过去x分钟。 |
alarm_threshold | double |
| 报警阈值。 |
threshold_cmp_op | string |
| 报警阈值的op。
|
alarm_sample_threshold | double |
| 样本数量阈值。 |
alarm_window_size | i64 |
| 时间窗口,单位为秒。 |
group_bys | array of group_bys |
| 报警的分组。 |
sample_metric | object of sample_metric | - | 简单指标。 |
user_metric | object of user_metric | - | 自定义指标。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
start_time | i32 |
| 开始时间,单位秒。 |
end_time | i32 |
| 结束时间,单位秒。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
notify_types | array of string |
| 报警通知方式。
|
notify_lark_webhooks | array of string |
| 飞书通知webhook列表。 |
notify_groups | array of string |
| 邮件接收组ID列表。 |
notify_wechat_webhooks | array of string |
| 企业微信通知webhook列表。 |
notify_dingding_webhooks | array of string |
| 钉钉通知webhook列表。 |
upgrade_groups | array of string |
| 升级邮件接收组ID列表。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
pct | i8 |
|
|
alarm_threshold | double |
| 报警阈值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | array of raw_measure_list |
| 具体查询指标。 |
name | string |
| 指标名称。 |
customId | string |
| 前端用于还原页面。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
op | string |
| 过滤方式。 |
filter_name | string |
| 用于表明filter的那个维度。 |
values | array of string |
| 过滤值。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
group_by_name | string |
| 分组维度。 |
label | string |
| 分组展示名称。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | array of raw_measure_list |
| 具体查询指标。 |
name | string |
| 指标名称。 |
customId | string |
| 前端用于还原页面。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
type | string |
| 指标类型。
|
raw_measure_list | array of raw_measure_list |
| 具体查询指标。 |
name | string |
| 指标名称。 |
customId | string |
| 前端用于还原页面 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
measure_name | string |
| 具体的指标计算值。 |
filter_list | array of filter_list |
| 过滤条件。 |
event_name | string |
| 前端传了此参数, 后端没有用到。但是还原图表的时候是从这个字段读的事件名。 |
POST /?Action=PCAlarmDetail&Version=2022-10-28 { "common": { "aid": 12345, "os": "pc", "site_type": "", "env": "crash" }, "id": 1 }
{ "data": { "num_of_alarm_in_last_one_month": 1, "alarm_param": { "name": "minitor", "desc": "新的报警", "is_close": 1, "category": "pc_flexible", "alarm_level": "Warn", "strategy_list": [ { "id": "9018754602-1655285699772", "alarm_strategy_type": "threshold", "alarm_threshold": 10, "threshold_cmp_op": "gt", "alarm_window_size": 180, "alarm_sample_threshold": 3, "group_bys": [ { "group_by_name": "os", "label": "OS" } ], "filter_list": [ { "op": "in", "filter_name": "cpu", "values": [ "intel", "Qualcomm" ] } ], "daily_compare_count": 60 } ], "strategy_op": "and", "interval_seconds": 300, "alarm_period": { "start_time": 820, "end_time": 86399 }, "category_label": "", "notify_config": { "notify_dingding_webhooks": [ "http://dingding/url" ], "notify_lark_webhooks": [ "http://lark/url" ], "notify_wechat_webhooks": [ "http://wechat/url" ], "upgrade_groups": [ 1, 23 ], "notify_groups": [ 1, 23 ], "notify_types": [ "mail" ] }, "id": 1 }, "updated_time": 1667550612, "last_execute_time": 1668550612, "next_trigger_time": 1667550612, "ack_until_time": 1667550612, "updated_by": "lisi", "created_time": 1667550612, "created_by": "zhangsan" }, "errno": 200, "errmsg": "" }
{ "ResponseMetadata": { "RequestId": "2018****22D30", "Action": "PCAlarmDetail", "Version": "2022-10-28", "Service": "***", "Region": "cn-north-1", "Error": { "Code": "200000", "Message": "参数异常" } } }