Jump to: navigation, search

Ceilometer/blueprints/alarm-over-time

< Ceilometer‎ | blueprints
Revision as of 09:39, 15 October 2013 by Sileht (talk | contribs)

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