Jump to: navigation, search

Obsolete:AddingAlarmsToCeilometer

Revision as of 02:16, 23 August 2012 by Asalkeld (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 the last 600sec (2 * 300) 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".