Jump to: navigation, search

Difference between revisions of "Ceilometer/blueprints/alarm-over-time"

(Created page with " == Summary == The idea is to create a new kind of alarm rule on the API part, and a new alarm evaluator that change state and trigger alarms actions over the time. Combinin...")
 
Line 31: Line 31:
  
 
The alarm above will set the alarm state to 'alarm' every working day since 8pm during 12 hours.
 
The alarm above will set the alarm state to 'alarm' every working day since 8pm during 12 hours.
 +
 
The alarm actions are called on each state change.
 
The alarm actions are called on each state change.
  
Line 43: Line 44:
  
 
The alarm above will set the alarm state to 'alarm' every 3 hours for 0 seconds.
 
The alarm above will set the alarm state to 'alarm' every 3 hours for 0 seconds.
 +
 
In reality for less time as possible, ie: the alarm evaluation_interval, because the alarm need to be reevaluate to change back to state 'ok'.
 
In reality for less time as possible, ie: the alarm evaluation_interval, because the alarm need to be reevaluate to change back to state 'ok'.
 +
 
This behavior permit to combinate this kind of alarm with an other one to trigger some actions every 3 hours if the other alarm state in 'alarm' too.
 
This behavior permit to combinate this kind of alarm with an other one to trigger some actions every 3 hours if the other alarm state in 'alarm' too.
  

Revision as of 09:39, 15 October 2013

Summary

The idea is to create a new kind of alarm rule on the API part, and a new alarm evaluator that change state and trigger alarms actions over the time.

Combining this kind alarm with an other alarm will allow to cover the following use case.

User stories

  • I don't want to receive the alarm callback during a certain time lapse.
  • I want to trigger a alarm action every three hours if an other alarm have a particular state.

API v2 extension proposition

{
    name: AlarmOverTime,
    type: time,
    description: Change at ,
    time_rule: { 
        time_spec: "0 8 * * 1-5",
        duration: 43200
    },
    ...
}

time_spec is a well know crontab like description and duration (in seconds) is the time we keep the alarm state in alarm

Evaluator behavior

The alarm above will set the alarm state to 'alarm' every working day since 8pm during 12 hours.

The alarm actions are called on each state change.

Other example:

time_rule: { 
    time_spec: "0 */3 * *",
    duration: 0
}

The alarm above will set the alarm state to 'alarm' every 3 hours for 0 seconds.

In reality for less time as possible, ie: the alarm evaluation_interval, because the alarm need to be reevaluate to change back to state 'ok'.

This behavior permit to combinate this kind of alarm with an other one to trigger some actions every 3 hours if the other alarm state in 'alarm' too.

Additional thinking

It would be cool in ceilometer to create a wsme type for 'duration' that convert time unit to seconds