Alarm constrained by time-of-day or day-of-week
Currently, alarm evaluation works the same way regardless of the time of the day or the day of the week.
However, it would be useful to have the flexibility to set the bar higher or lower at different times of the day or days of the week. For example to do one thing if the alarm condition occurs during normal working hours, but do something else if it occurs at the weekend.
A typical usecase would be an autoscaling group with a more aggressive scale-up policy at the weekend (i.e. scaling up quicker & farther when the under-scaled alarm fires) because instance hours might be cheaper at this time, and operations man-power is generally less abundant (so that manual remediation, if required, would be more awkward).
This would not necessitate adding yet another alarm type (in addition to the existing threshold-oriented and meta-alarms). Instead this requirement could be met by encoding the time constraints in the alarm definition and considering this as part of the generic alarm evaluation.
The fine-grained design decisions and implementation tasks would include:
* decide how many time-constraints may be associated with an individual alarm (1:1, or M:1 combined using logical OR)
* decide how the time-constraints associated with an alarm are accommodated within the alarm storage model
** if encoded directly in the alarm rule, then this would not require a substantive change to the schema via a DB migration
* decide how to represent the time-constraints in a concise and easily-understood way
** a convenient and widely-understood way of expressing such constraints would be via cron expressions (though such expressions are better suited to capturing specific times as opposed to time-ranges)
* add the logic to enforce the time-constraints within the ceilometer.
* add support for time-constraint to the pthyon-
Blueprint information
- Status:
- Complete
- Approver:
- Julien Danjou
- Priority:
- Medium
- Drafter:
- Eoghan Glynn
- Direction:
- Approved
- Assignee:
- Nejc Saje
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
- Implemented
- Milestone target:
- 2014.1
- Started by
- Eoghan Glynn
- Completed by
- Julien Danjou
Related branches
Related bugs
Sprints
Whiteboard
Suggestion for the solution:
https:/
If ok with you, Nejc Saje and me can start working on this.
Gerrit topic: https:/
Addressed by: https:/
Adds time constraints to alarms [WIP]