告警规则:创建v4.1(1) 参数 是否必填 参数类型 说明 示例 下级对象 regionID 是 String 资源池ID 81f7728662dd11ec810800155d307d5b name 是 String 规则名 告警规则示例 service 是 String 本参数表示服务。取值范围: ecs:云主机。 evs:云硬盘。 pms:物理机。 ... 详见" ecs dimension 是 String 本参数表示告警维度。取值范围: ecs:云主机。 disk:磁盘。 pms:物理机。 ... 详见" ecs conditions 否 Array of Objects 具体告警匹配策略 conditions desc 否 String 规则描述 规则描述 repeatTimes 否 Integer 重复告警通知次数,默认为0,当repeatTimes值为1,代表无限重复。 0 silenceTime 否 Integer 告警接收策略静默时间,多久重复通知一次,单位:秒 300 recoverNotify 否 Integer 本参数表示恢复是否通知。默认值0。取值范围: 0:否。 1:是。 根据以上范围取值。 0 notifyType 否 Array of Strings 本参数表示告警接收策略。取值范围: email:邮件告警。 sms:短信告警。 根据以上范围取值。 contactGroupList 否 Array of Strings 告警联系组 notifyWeekdays 否 Array of Integers 本参数表示通知周期。默认值[0,1,2,3,4,5,6]。取值范围: 0:周日。 1:周一。 2:周二。 3:周三。 4:周四。 5:周五。 6:周六。 根据以上范围取值。 notifyStart 否 String 通知起始时段,默认为00:00:00 00:00:00 notifyEnd 否 String 通知结束时段,默认为23:59:59 23:59:59 webhookUrl 否 Array of Strings webhook消息推送url resGroupID 否 String 资源分组ID,与resources字段互斥。 1.以资源分组为资源对象的告警规则,不需要传入resources。 2.非资源分组为资源对象的告警规则,resources为必填项。 eec4a76a35ba57b891c6c4fd923351d6 resources 是 Array of Objects 具体告警匹配资源 resources projectID 否 String 项目ID 0 conditionType 否 Integer 本参数表示告警策略触发类型。默认值0。取值范围: 0:或,任一条件触发。 1:全部条件满足触发。 根据以上范围取值。 0 resourceScope 否 Integer 规则的资源范围,默认值0,取值范围: 0:实例资源类型。 1:资源分组类型。 2:全部资源类型 。 根据以上范围取值。 0 defaultContact 否 Integer 是否使用天翼云默认联系人接收通知,默认值0,取值范围: 0:否。 1:是。 根据以上范围取值。 0 noticeStrategyID 否 String 通知策略ID 3ec4a76a35ba57b891c6c4fd923351d6
来自: