Partially Implements: blueprint event-driven-optimization-based Change-Id: Id88fa1d7c7fa49ccdfbeb011a4acca8626727b4d
3.1 KiB
Event-driven optimization based
https://blueprints.launchpad.net/watcher/+spec/event-driven-optimization-based
Problem description
Watcher has provided ONESHOT and CONTINUOUS audit. ONESHOT audit executes the optimization only once after being launched. CONTINUOUS audit executes the optimization periodly. But there is no way to react to the changes of system, for example an alarm event.
Use Cases
As a user of Watcher, I want to execute optimization as soon as possible when there are alarms in the system.
Proposed change
Many monitor system, such as aodh,
can set webhook as
alarm action, a POST request will be sent if the alarm is trigered.
About the authentication of the POST request, Aodh's alarm
action can set prefix trust
to add a
X-Auth-Token
header to the request url. Watcher add a new
config option enable_webhooks_auth
to decide whether to
enable webhook authentication, the default is True. Watcher add the
mechanism for receiving and handling alarm events.
Here is the summary processing: User creates an event based audit, a new audit type, named EVENT, is needed. Creating alarm with Watcher webhook and audit uuid in the monitor system such as aodh. When the alarm is trigered, Watcher will receive the event with audit uuid. Watcher executes the audit and creates actionplan.
Alternatives
CONTINUOUS audit can be used to satisfy the purpose but this will increase the workload.
Data model impact
None
REST API impact
Add a new webhook API
- /v1/webhooks/{audit_ident}
- Triggers an event based audit, audit_ident is uuid or name of the audit. Does not perform verification of authentication token.
- Method type: POST
- Normal http response code: 202(Accepted)
- Expected error http response code: 400, 404(Not Found)
Security impact
None
Notifications impact
None
Other end user impact
None
Performance Impact
None
Other deployer impact
None
Developer impact
None
Implementation
Assignee(s)
- Primary assignee:
-
licanwei
Work Items
- Add a new audit type, named EVENT
- Add a new webhook API
- processing for event based audit
Dependencies
None
Testing
- Unit tests for the new feature
Documentation Impact
- Add documentation about how to use the new feature
References
https://docs.openstack.org/aodh/latest/
History
Release Name | Description |
---|---|
Ussuri | Introduced |