更新时间:2024-04-29 GMT+08:00
分享

查询告警消息列表

功能介绍

查询单个告警的触发详情与历史。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

POST /v1/apm2/openapi/alarm/data/get-alarm-notify-list

请求参数

表1 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

从IAM服务获取的用户Token。

x-business-id

Long

应用id,用于鉴权。

表2 请求Body参数

参数

是否必选

参数类型

描述

page

Integer

页码。

page_size

Integer

每页数量。

alarm_data_id

Integer

告警事件id。

region

String

region英文名称。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

front_alarm_notify_results

Array of FrontAlarmNotifyResult objects

告警通知列表。

total_count

Integer

消息总数。

表4 FrontAlarmNotifyResult

参数

参数类型

描述

id

Long

告警通知id。

gmt_create

String

创建时间。

notify_type

String

通知类型。

alarm_rule_id

Long

告警规则id。

template_id

Long

模板id。

alarm_data_event_id

Long

关联事件id。

notify_status

Boolean

通知结果。

alarm_content

String

通知内容。

请求示例

分页查询告警事件ID为42,Region ID为xxx-roma-2的触发详情与历史

/v1/apm2/openapi/alarm/data/get-alarm-notify-list

{
  "alarm_data_id" : 42,
  "region" : "xxx-roma-2",
  "page" : 1,
  "page_size" : 10
}

响应示例

状态码: 200

OK,请求响应成功。

{
  "front_alarm_notify_results" : [ {
    "id" : 1741,
    "gmt_create" : "2022-10-09 22:58:27",
    "notify_type" : "RECOVER",
    "alarm_rule_id" : 3,
    "template_id" : 2,
    "alarm_data_event_id" : 42,
    "notify_status" : false,
    "alarm_content" : "CPU0.017使用率为0.017"
  }, {
    "id" : 1735,
    "gmt_create" : "2022-10-09 22:58:26",
    "notify_type" : "RECOVER",
    "alarm_rule_id" : 3,
    "template_id" : 2,
    "alarm_data_event_id" : 42,
    "notify_status" : false,
    "alarm_content" : "CPU0.017使用率为0.017"
  }, {
    "id" : 682,
    "gmt_create" : "2022-10-09 21:20:11",
    "notify_type" : "RECOVER",
    "alarm_rule_id" : 3,
    "template_id" : 2,
    "alarm_data_event_id" : 42,
    "notify_status" : false,
    "alarm_content" : "CPU0.017使用率为0.017"
  }, {
    "id" : 639,
    "gmt_create" : "2022-10-09 21:16:04",
    "notify_type" : "ALARM",
    "alarm_rule_id" : 3,
    "template_id" : 2,
    "alarm_data_event_id" : 42,
    "notify_status" : false,
    "alarm_content" : "CPU0.021使用率为0.021"
  } ],
  "total_count" : 4
}

状态码

状态码

描述

200

OK,请求响应成功。

400

Bad Request,语义或参数有误。

401

Unauthorized,没有权限。

403

Forbidden,禁止访问。

404

Not Found,没有找到要请求的资源。

错误码

请参见错误码

分享:

    相关文档

    相关产品