Obsolete:AddingAlarmsToCeilometer
This page describes the "why" and "how" I'd like to add Alarms (and general AWS::CloudWatch functionality) to Ceilometer.
Purpose
The purpose of Alarms is to notify a user when a meter matches a certain criteria.
Example use cases
- "Tell me when the maximum disk utilization exceeds 90%"
- "Tell me when the average CPU utilization exceeds 80% over 120 seconds"
- "Tell me when my web app is becoming unresponsive" (loadbalancer latency meter)
- "Tell me when my httpd daemon dies" (custom user script that checks daemon health)
How can you use Alarms
Create an alarm
{ 'period': '300', 'eval_periods': '2', 'meter': 'CPUUtilization', 'function': 'average', 'operator': 'gt', 'threshold': '50' 'resource_id': 'inst-002', 'source': 'OS/compute', 'alarm_actions': ['rpc/my_notify_topic', 'http://bla.com/bla'], 'ok_actions': ['rpc/my_notify_topic'] }
This will check the "CPUUtilization" meter events every 300sec
and if the average CPUUtilization was > 50% (for inst-002) for both of the
last 2 300sec periods then it will send an rpc notification on the "my_notify_topic" topic
and post the alarm details to http://bla.com/bla.
Then when the alarm goes below this level it will do the "ok_actions".