AODH是从Ceilometer分离出来的一个子项目,开始于OpenStack Liberty,用来提供alarm机制。
除了之前Ceilometer有的基于sample的警报机制,AODH还添加了基于事件的警报机制,使得警报可以实时。
SETUP
To configure devstack to use Aodh
Add the following to your local.conf or localrc file:
# Enable Aodh alarm service
enable_plugin aodh git://git.openstack.org/openstack/aodh
enable_service aodh-evaluator aodh-notifier aodh-api
disable_service Ceilometer-alarm-notifier Ceilometer-alarm-evaluator
To configure listening on the alarm topic
Check all event-alarms, filter events in the “alarm.all” topic, and configure the same to listen for alarm events. In addition, add the following line, post the original notifier, to your /etc/Ceilometer/event_pipeline.yaml:
- notifier://?topic=alarm.all
- notifier://
Or add the following in the devstack local.conf or localrc:
CEILOMETER_EVENT_ALARM=True
This config is honored by devstack only when Ceilometer is configured as a plugin in the devstack local.conf
enable_plugin Ceilometer git://git.openstack.org/openstack/Ceilometer
To install AODH-supported Ceilometer client
First, you must ensure you are using a Python-Ceilometer client that is at least version 1.5.0. To check the version, do the following:
$ pip show Python-Ceilometerclient
---
Metadata-Version: 2.0
Name: Python-Ceilometerclient
Version: 1.5.0
Summary: OpenStack Telemetry API Client Library
To update it:
$ pip uninstall Python-Ceilometerclient
$ pip install Python-Ceilometerclient
ALARM EVENT DEFINITION
To generate an alarm event when an image is updated assume the image resource id is 9a8fec25-1ba6-4170-aa44-5d72f17c07f6 and we are interested in updates to the same.
$ Ceilometer -d alarm-event-create --name event_alarm1 --alarm-action 'log://' --event-type image.update -q 'traits.resource_id=string::9a8fec25-1ba6-4170-aa44-5d72f17c07f6'
Then, use following to trigger an “image.update” event:
nova image-meta cirros-0.3.4-x86_64-uec-ramdisk set progress=104
Watch the devstack screen window: aodh-notifier to capture the firing of the event alarm.
For more information, please see the following
1. Blueprint: https://blueprints.launchpad.net/Ceilometer/+spec/event-alarm-evaluator
2. Spec: http://specs.openstack.org/openstack/Ceilometer-specs/specs/liberty/event-alarm-evaluator.html
3. Docs: http://docs.openstack.org/developer/aodh/index.html
4. Demo: https://drive.google.com/a/intel.com/file/d/0BxzNz3_8jMMIa21NOUVGaXoyem8/view
5. Open issues: https://review.openstack.org/#/q/status:open+project:openstack/aodh,n,z
6. AODH name: http://www.behindthename.com/name/aodh