-
响应参数 状态码: 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 通知内容。
-
响应示例 状态码: 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
}
-
请求参数 表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英文名称。
-
为什么告警规则页面和指标浏览页面智能告警功能渲染的告警边界值不一致? 在告警规则详情页面和指标浏览页面使用智能告警功能监控相同的指标时,智能告警功能渲染的告警边界值不一致,原因如下: 指标浏览页面展示的告警边界值不是实时渲染,系统根据上报的指标数据提前计算好,并存储至数据库中的告警边界值。 告警规则详情页面展示的告警边界值是实时渲染,在告警规则详情页面查看指标数据时,智能告警功能会根据指标数据实时渲染告警边界值。 父主题: 告警管理
-
概述 告警管理功能提供告警数据的收集、纳管和处理。 本功能支持集成多个现有或第三方等监控系统(比如
CES 、
AOM 、Prometheus),并将业务下分散的告警信息进行统一收集,生成原始告警。用户可以在集成管理处启用或禁用已有告警源,或者接入第三方监控系统。 本功能还支持汇聚告警的管理。通过设置流转规则,用户可以将接收到的符合指定规则的多条原始告警汇聚成单条告警,称为汇聚告警。 对于汇聚告警,用户可以转事件单处理,或者对其执行脚本和作业,并自动通知相应责任人。汇聚告警减少了重复告警,避免了告警风暴,提高用户处理告警的效率。 注意,初始生成的汇聚告警为当前告警,用户对汇聚告警进行处理、转事件或清除操作后,其会被转移到历史告警中。 此外,本功能可以帮助用户高效创建和管理告警规则。其提供了跨账号、跨区域的告警规则配置能力,帮助用户提高批量配置的效率。告警规则目前仅支持CES告警的配置。 图1 告警管理流程 父主题: 告警管理
-
约束与限制 单用户单工作空间内容最多新增300条支持阻断老化的应急策略,全量最多新增2500条应急策略。同时,单次下发策略阻断对象数量限制如下: 当需要下发策略至CFW时,单用户单次最多可新增500个IP或
域名 作为阻断对象。 当需要下发策略至WAF时,单用户单次最多可新增500个IP作为阻断对象。 当需要下发策略至VPC时,单用户单次1分钟内最多可新增500个IP作为阻断对象。 当需要下发策略至IAM时,单用户单次最多可新增500个IAM用户作为阻断对象。 将IP或IP地址段或IAM用户配置为黑名单后,来自该IP或IP地址段或用户的访问,CFW/WAF/VPC/IAM将不会做任何检测,直接拦截。 为确保系统稳定性,同时执行的应急策略任务数量必须小于等于5个,若检测到已有5个任务正在执行,系统将禁止继续新增、重试或编辑应急策略操作。 应急策略新增成功后,不支持修改阻断对象类型和阻断对象(即新增时设置的IP地址或IP地址段或IAM用户名)。 应急策略新增成功后,不支持修改策略对象、策略类型、对象类型、和已经勾选的操作连接。
-
操作场景 应急策略作为告警一键阻断的止血手段,可根据告警来源选择相应的类型对攻击者进行阻断,拦截该恶意IP的访问。表1中为推荐设置,除此之外,您也可以结合对多条告警的综合调查结果,对单个攻击源采用多种类型进行阻断。 表1 推荐阻断策略 告警类型 对应防线 推荐阻断策略 HSS告警 主机防线 建议优先采用VPC策略阻断 WAF告警 应用防线 建议优先采用WAF策略阻断 CFW告警 网络防线 建议优先采用CFW策略阻断 IAM告警 身份防线 建议优先采用IAM策略阻断 OBS/DBSS告警 数据防线 当前可根据实际攻击场景和调查结果考虑使用VPC策略阻断/CFW策略阻断,隔绝防护资产和攻击源的网络通信等 本章节介绍如何执行一键阻断和一键解封操作。
-
请求示例 HTTP的示例 POST /v1/perfservice/alarms/current-alarms/statistic HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"objectIds" : [
""
],
"cleared" : "0"
}
-
响应参数 返回状态码为200:接口调用成功,响应体参考AlarmStatisticOutput。 表3 AlarmStatisticOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~256个字符。 - 错误码。 "null" errmsg string 0~256个字符。 - 错误信息。 "null" data ARRAY_REFERENCE 0-500个列表项,详细请参见表4。 告警统计结果数据 - 表4 AlarmStatisticData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 objectId string 1~64个字符。 - 统计对象id - criticalAlarmNum string 0~32个字符。 - 紧急告警统计 "10" majorAlarmNum string 0~32个字符。 - 重要告警统计 "15" minorAlarmNum string 0~32个字符。 - 次要告警统计 "30" warningAlarmNum string 0~32个字符。 - 提示告警统计 "40" 返回状态码为400:接口入参非法的状态返回码。 详细信息请参见实际响应消息体。 返回状态码为500:接口发生内部错误后的状态返回码。 详细信息请参见实际响应消息体。
-
响应示例 返回状态码为200:接口调用成功,响应体参考AlarmStatisticOutput。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "null",
"errmsg" : "null",
"data" : [
{
"objectId" : "",
"criticalAlarmNum" : "10",
"majorAlarmNum" : "15",
"minorAlarmNum" : "30",
"warningAlarmNum" : "40"
}
]
} 返回状态码为400:接口入参非法的状态返回码。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
返回状态码为500:接口发生内部错误后的状态返回码。 HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
响应示例 返回状态码为200:接口调用成功,响应体参考CurrentAlarmOutput。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "null",
"errmsg" : "null",
"iterator" : "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270",
"data" : [
{
"csn" : "28100132",
"alarmName" : "设备离线",
"alarmLevel" : 3,
"alarmId" : "279998",
"alarmResId" : "OSS",
"alarmResName" : "OSS",
"latestOccurUtc" : "1711029340291",
"alarmCategory" : "1",
"additionalInformation" : "additional=the device actively disconnects",
"cleared" : 0,
"probableCause" : "设备主动离线或网络异常",
"repairAction" : "",
"alarmGroupId" : "100000"
}
]
} 返回状态码为400:接口入参非法的状态返回码。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
返回状态码为500:接口发生内部错误后的状态返回码。 HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求示例 HTTP的示例 POST /v1/perfservice/alarms/current-alarms/action/scroll HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"filter" : {
"deviceGroupIds" : ["ea25fdbf-8dee-4823-bac2-5bfe8e3359ca","ea25fdbf-8dee-4823-bac2-5bfb8e3358ca"],
"csn" : "28100132",
"alarmLevels" : ["3","4"],
"keyword" : "设备离线"
},
"iterator" : "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270",
"size" : 100
}
-
响应参数 返回状态码为200:接口调用成功,响应体参考CurrentAlarmOutput。 表4 CurrentAlarmOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "null" errmsg string 0~256个字符。 - 错误信息。 "null" iterator string 0~256个字符。 - 查询迭代算子,起始查询可以不传 "1&-1283131115#ccf99fa3-5c2d-48a7-a7c4-94116a0f1270" data ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 告警数据 - 表5 AlarmRecordData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 csn string 1~256个字符。 - 告警流水号 "28100132" alarmName string 1~1024个字符。 - 告警名称 "设备离线" alarmLevel int32 [1-4] - 告警级别,1-紧急,2-重要,3-次要,4-提示 3 alarmId string 1~64个字符。 - 告警id "279998" alarmResId string 0~64个字符。 - 告警源id "OSS" alarmResName string 0~512个字符。 - 告警源名称 "OSS" latestOccurUtc string 0~64个字符。 - 最近发生时间 "1711029340291" alarmCategory string 0~128个字符。 - 告警类型 "1" additionalInformation string 0~2048个字符。 - 附加信息 "additional=the device actively disconnects" cleared int32 [0-1] - 清除状态,0-未清除,1-已清除 0 probableCause string 0~4096个字符。 - 可能原因 "设备主动离线或网络异常" repairAction string 0~1024个字符。 - 修复建议 "" alarmGroupId string 0~1024个字符。 - 告警分组id "100000" 返回状态码为400:接口入参非法的状态返回码。 详细信息请参见实际响应消息体。 返回状态码为500:接口发生内部错误后的状态返回码。 详细信息请参见实际响应消息体。
-
请求示例 收集外部告警数据的请求体内容 POST https://{endpoint}/v1/external-alarm
{
"signature" : "OeJ5QozBXn4lI+S+rklNSg7jX85hLFsYMdLfkh07NMOdJXIxq8eGkI+io1lUgJlxKYAIE98m8nXII0+IrlEe5ovVjaFIYkg7f0+qKL+jyfZv5lyJwPAE+WXQuHPRPy7ZBr1fnzXJpnTeDT7Js9LNLnSF7I3RkA0i+pggZv36jhC0ZGaYr8cnlekpnw7hQgGDWf48ZA57f1OP5LbsisL4KmyW3y2mf5/UPnhBK+s1SfiLarGJkFqOKGDn4MPxO81iGUDokGQQr6MpmWL9mHGACKkymnyEQcsZQnKoFsNjtJ/oGM8D14I3r4K20n0GvWPDxZou6wpbN6dvmSmtuqI0Rw==",
"subject" : "[紧急告警]
云监控 通知:API网关专享版-APIG实例 “dalf-d67f-f9d7dce4-60d8-4566-9d66-82503cb92d88” 的接口调用次数已触发告警。",
"topic_urn" : "urn:smn:cn-north-7:a41e18612c054a4c994bb7a837a91ebe:CES_notification_group_aKan6BAzR",
"message_id" : "cfd477a2441b45179ba0dcfbd22f2c88",
"signature_version" : "v1",
"type" : "Notification",
"message" : "{\n \"message_type\": \"alarm\",\n \"alarm_id\": \"al1695796819449Pv80VlkvN\",\n \"alarm_name\": \"DALF_APIC_requests_EMERGENCY\",\n \"alarm_status\": \"alarm\",\n \"time\": 1695797165992,\n \"namespace\": \"SYS.APIC\",\n \"metric_name\": \"requests\",\n \"dimension\": \"instance_id:af042c1def5b41389ab88c676ba275a4\",\n \"period\": 1,\n \"filter\": \"Raw data\",\n \"comparison_operator\": \"\\u003e=\",\n \"value\": 50,\n \"unit\": \"\",\n \"count\": 1,\n \"alarmValue\": [\n {\n \"time\": 1695796980000,\n \"value\": 99\n }\n ],\n \"sms_content\": \"[华北-xxxxxxxx][紧急告警]尊敬的xxx:API网关专享版-APIG实例 “dalf-xxxx-xxxxxxx-xxxx-4eac-8b89-4bededd47e9d” (ID:af042c1def5b41389ab88c676ba275a4)的接口调用次数连续1次原始值 \\u003e= 50次/分钟,当前数据:99.00次/分钟,于2023/09/27 14:46:05 GMT+08:00触发告警,触发规则:DALF_APIC_requests_EMERGENCY,详情请访问
云监控服务 。\",\n \"default_content\": \"[华北-乌兰察布-二零三][紧急告警]尊敬的xxx:API网关专享版-APIG实例 “dalf-xxxx-xxxxxxxx-xxxx-4eac-8b89-4bededd47e9d” (ID:af042c1def5b41389ab88c676ba275a4)的接口调用次数连续1次原始值 \\u003e= 50次/分钟,当前数据:99.00次/分钟,于2023/09/27 14:46:05 GMT+08:00触发告警,触发规则:DALF_APIC_requests_EMERGENCY,详情请访问云监控服务。\"\n }",
"unsubscribe_url" : "https: //example.com/smn/subscription/unsubscribe?region=cn-north-7®ion_id=cn-north-7&subscription_urn=urn:smn:cn-north-7:a41e18612c054a4c994bb7a837a91ebe:CES_notification_group_aKan6BAzR:93b74d59e4364e8e9ea0167b8bf0d2f6",
"signing_cert_url" : "https://example.com/smn/
SMN _cn-north-7_94f7b4675c6a45f282b7d8e3ea30713e.pem",
"timestamp" : "2023-09-15T06:46:07Z"
}
-
响应参数 状态码:400 表2 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码:401 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码:403 表4 响应Body参数 参数 参数类型 描述 error Error object 错误信息。 error_code String 错误码。 error_msg String 错误描述。 title String 标题。 表5 Error 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 title String 标题。 message String 错误信息。 code String 状态码。 状态码:404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码:408 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码:500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。