- 最新动态
- 功能总览
- 产品介绍
- 快速入门
- 用户指南
- 最佳实践
- API参考
- SDK参考
- 常见问题
- 视频帮助
-
更多文档
-
用户指南(阿布扎比区域)
- 产品介绍
- 快速入门
- 监控看板
- 资源分组
- 使用告警功能
- 主机监控
- 自定义监控
- 事件监控
- 任务中心
- 数据转储
- 云服务监控
- 审计云监控服务操作记录
- 权限管理
- 配额调整
- 支持监控的服务列表
-
常见问题
- 产品咨询
-
主机监控
- 什么是插件修复配置?
- 怎样让新购ECS实例中带有操作系统监控功能?
- 裸金属服务器安装Agent后,裸金属实例为何出现在“主机监控 > 弹性云服务器”列表中?
- Agent支持的系统有哪些?
- Agent不同插件状态说明及处理方式
- Agent状态切换或监控面板有断点该如何处理?
- 业务端口被Agent占用该如何处理?
- 如何创建委托?
- 不能创建委托该如何处理?
- 委托被占用该如何处理?
- 委托已失效该如何处理?
- 主机监控Agent对主机的性能会有影响吗?
- Agent插件状态显示“故障”该如何处理?
- Agent插件状态显示“已停止”该如何处理?
- Agent插件状态显示“运行中”但没有数据该如何处理?
- 如何排查Agent一键修复失败问题?
- Agent一键修复后无监控数据问题排查
- 告警通知或误告警
- 监控数据异常
- 监控指标含义
- 用户权限
- API参考(阿布扎比区域)
- 用户指南(巴黎区域)
- API参考 (巴黎区域)
- 用户指南(吉隆坡区域)
- API参考(吉隆坡区域)
- 用户指南(安卡拉区域)
- API参考(安卡拉区域)
-
用户指南(阿布扎比区域)
- 通用参考
链接复制成功!
修改告警规则告警通知信息
功能介绍
修改告警规则告警通知信息,告警策略&资源请使用对应接口
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
PUT /v2/{project_id}/alarms/{alarm_id}/notifications
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租户ID 最小长度:1 最大长度:64 |
alarm_id |
是 |
String |
告警规则ID 正则匹配:^al([0-9A-Za-z]){22}$ |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
Content-Type |
否 |
String |
发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 缺省值:application/json; charset=UTF-8 最小长度:1 最大长度:64 |
X-Auth-Token |
否 |
String |
用户Token 最小长度:1 最大长度:16384 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
notification_enabled |
是 |
Boolean |
是否开启告警通知,值为true时,其他字段均必选,值为false时,其他字段可不选 |
alarm_notifications |
否 |
Array of Notification objects |
告警触发的动作 |
ok_notifications |
否 |
Array of Notification objects |
告警恢复触发的动作 |
notification_begin_time |
否 |
String |
告警通知开启时间 |
notification_end_time |
否 |
String |
告警通知关闭时间 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
type |
是 |
String |
通知类型, notification代表通过SMN通知 正则匹配:^(notification|autoscaling|ecsRecovery|contact|contactGroup|iecAction)$ |
notification_list |
是 |
Array of strings |
告警状态发生变化时,被通知对象的列表。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notification_list列表不能为空。 说明:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notification_list值保持一致。 数组长度:0 - 20 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
notification_enabled |
Boolean |
是否开启告警通知 |
alarm_notifications |
Array of Notification objects |
告警触发的动作 |
ok_notifications |
Array of Notification objects |
告警恢复触发的动作 |
notification_begin_time |
String |
告警通知开启时间 |
notification_end_time |
String |
告警通知关闭时间 |
参数 |
参数类型 |
描述 |
---|---|---|
type |
String |
通知类型, notification代表通过SMN通知 正则匹配:^(notification|autoscaling|ecsRecovery|contact|contactGroup|iecAction)$ |
notification_list |
Array of strings |
告警状态发生变化时,被通知对象的列表。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notification_list列表不能为空。 说明:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notification_list值保持一致。 数组长度:0 - 20 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
请求异常内部业务状态码 最小长度:0 最大长度:256 |
error_msg |
String |
请求异常信息 最小长度:0 最大长度:256 |
request_id |
String |
请求ID 最小长度:0 最大长度:256 |
状态码: 500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
请求异常内部业务状态码 最小长度:0 最大长度:256 |
error_msg |
String |
请求异常信息 最小长度:0 最大长度:256 |
request_id |
String |
请求ID 最小长度:0 最大长度:256 |
请求示例
修改告警规则告警通知信息
{ "notification_enabled" : true, "alarm_notifications" : [ { "type" : "", "notification_list" : [ ] } ], "ok_notifications" : [ { "type" : "", "notification_list" : [ ] } ], "notification_begin_time" : "00:00", "notification_end_time" : "23:59" }
响应示例
状态码: 200
修改告警规则告警通知信息成功
{ "notification_enabled" : true, "alarm_notifications" : [ { "type" : "", "notification_list" : [ ] } ], "ok_notifications" : [ { "type" : "", "notification_list" : [ ] } ], "notification_begin_time" : "00:00", "notification_end_time" : "23:59" }
状态码
状态码 |
描述 |
---|---|
200 |
修改告警规则告警通知信息成功 |
400 |
参数校验失败 |
500 |
系统内部错误 |
错误码
请参见错误码。