Monasca 告警和通知资源插件¶
https://blueprints.launchpad.net/heat/+spec/support-monasca-alarm-notification
添加 Monasca 告警和通知资源插件
问题描述¶
OpenStack 提供监控即服务 (monasca),更多详情请参见 wiki https://wiki.openstack.org/wiki/Monasca 在 heat 中,没有可用于 monasca 服务的资源插件。此蓝图旨在提供 Monasca 告警和通知所需的插件。
提议的变更¶
添加以下资源插件
OS::Monasca::Alarm
- name
类型:字符串
required: false
default: physical_resource_name
update_allowed: false
description
- description
类型:字符串
required: false
update_allowed: true
- expression
类型:字符串
required: true
update_allowed: true
- match_by
类型:字符串
required: false
update_allowed: true
- severity
type: list
required: false
update_allowed: true
allowed_values: [low, medium, high, critical]
default: low
- alarm_actions
type: list
required: false
update_allowed: true
列表项约束:自定义约束 ‘monasca.notification’
- ok_actions
type: list
required: false
update_allowed: true
列表项约束:自定义约束 ‘monasca.notification’
- undetermined_actions
type: list
required: false
update_allowed: true
列表项约束:自定义约束 ‘monasca.notification’
OS::Monasca::Notification
- name
类型:字符串
required: false
default: physical_resource_name
update_allowed: false
- type
类型:字符串
required: true
update_allowed: true
allowed_values: [email, webhook, pagerduty]
- address
类型:字符串
required: true
update_allowed: true
自定义约束 ‘monasca.notification’
由于 monasca 将通知与告警分离,为了与 heat 中现有的其他告警资源兼容,添加了以下附加资源,其中所有操作都被视为 webhook。
如果用户提供的 webhook 在 monasca 中不存在,heat 将在创建告警之前使用该 webhook 创建新的通知,否则将使用该 webhook 的现有通知。
OS::Monasca::AlarmI
- name
类型:字符串
required: false
default: physical_resource_name
update_allowed: false
description
- description
类型:字符串
required: false
update_allowed: true
- expression
类型:字符串
required: true
update_allowed: true
- match_by
类型:字符串
required: false
update_allowed: true
- severity
type: list
required: false
update_allowed: true
allowed_values: [low, medium, high, critical]
default: low
- alarm_actions
type: list
required: false
update_allowed: true
列表项约束:Webhook URL
- ok_actions
type: list
required: false
update_allowed: true
列表项约束:Webhook URL
- undetermined_actions
type: list
required: false
update_allowed: true
列表项约束:Webhook URL
所有这些资源插件都将从版本 ‘5.0.0’ 开始支持
备选方案¶
无
实现¶
负责人¶
- 主要负责人
duanlg@live.cn kanagaraj-manickam
里程碑¶
- 完成目标里程碑
Liberty-1
工作项¶
实现 Monasca 客户端插件
实现自定义约束 ‘monasca.notification’
实现如上所述的告警和通知资源插件
实现仅在可用 python-monascaclient 时才加载 monsaca 资源的逻辑。
实现所需的测试用例。
在 heat-templates github 仓库中添加示例模板。
依赖项¶
无