Jump to: navigation, search

Difference between revisions of "Obsolete:AddingAlarmsToCeilometer"

 
Line 7: Line 7:
  
 
== Example use cases ==
 
== Example use cases ==
"Tell me when the maximum disk utilization exceeds 90%"
+
* "Tell me when the maximum disk utilization exceeds 90%"
"Tell me when the average CPU utilization exceeds 80% over 120 seconds"
+
* "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 web app is becoming unresponsive" (loadbalancer latency meter)
"Tell me when my httpd daemon dies" (custom user script that checks daemon health)
+
* "Tell me when my httpd daemon dies" (custom user script that checks daemon health)
  
 
== How can you use Alarms ==
 
== How can you use Alarms ==
Line 33: Line 33:
  
 
This will check the "CPUUtilization" meter events every 300sec
 
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)
+
and if the average CPUUtilization was > 50% (for inst-002) for both of the
then it will send an rpc notification on the "my_notify_topic" topic
+
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.
 
and post the alarm details to http://bla.com/bla.
  
 
Then when the alarm goes below this level it will do the "ok_actions".
 
Then when the alarm goes below this level it will do the "ok_actions".

Revision as of 02:19, 23 August 2012

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".