Monasca API Alarm Manager Resources

Registered by Kaiyan on 2017-02-08

During our discussion about adding more alarm related functionalities, we realized it will be good to have three new Monasca API resources: alarm grouping, alarm silencing and alarm inhibition, to make the new alarm manager functionalities easy to configure. Grouping is used to categorize alarms of similar nature into a single notification. Silencing is a functionality to mute alarms for a given time. Inhibition is a concept of suppressing notifications for certain alarms if certain other alarms are already firing.

There are several operations that will be added into the alarm grouping manager.
1. Create alarm grouping manager
  1.1. POST/alarm-grouping-manager
  1.2. Request body will include:
    1.2.1. Name(required)
    1.2.2. Matchers(required)
                The labels by which incoming alarms are grouped together. For example, if matchers = [{“alarm_name”, “hostname”}, multiple alarms coming in for the same hostname and the same alarm_name would be batched into a single group.
    1.2.3. Group wait
                When a new group of alarms is created by an incoming alarm, wait at least 'group wait' to send the initial notification. This way ensures that you get multiple alarms for the same group that start firing shortly after one another are batched together on the first notification.
    1.2.4. Repeat interval
                If an alert has successfully been sent, wait 'repeat interval' to resend them. This will be implemented using the existing period notification function.
    1.2.5. Exclusions
                Exclusions can be added to alarm grouping rules. For example, if exclusions = {“alarm_name”: “cpu_percent_high”}, all the alarms with name “cpu_percent_high” will not be grouped. Instead, all the “cpu_percent_high” alarms will have notifications send out immediately.
    1.2.6. Alarm_actions
                Array of notification method IDs that are invoked when grouped ALARM state notifications need to be sent.
    1.2.7. OK_actions
                Array of notification method IDs that are invoked when grouped OK state notifications need to be sent.
    1.2.8. UNDETERMINED_actions
                Array of notification method IDs that are invoked when grouped UNDETERMINED state notifications need to be sent.
2. List alarm grouping manager
  2.1. GET/alarm-grouping-manager
  2.2. Query parameter: name
3. Get alarm grouping manager
  3.1. GET/alarm-grouping-manager/{alarm_grouping_manager_id}
  3.2. Path parameter: alarm_manager_id
4. Update alarm manager
  4.1. PUT/alarm-grouping-manager/{alarm_grouping_manager_id}
  4.2. Path parameter: alarm_manager_id
5. Patch alarm manager
  5.1. PATCH/alarm-grouping-manager/{alarm_grouping_manager_id}
  5.2. Path parameter: alarm_manager_id
6. Delete alarm manager
  6.1. DELETE/ alarm-grouping-manager/{alarm_grouping_manager_id}
  6.2. Path parameter: alarm_grouping_manager_id

Also, Monasca API will need to have the ability to query what the group alarms are and what are the alarms got grouped under one specific group. Adding “list alarm groups” under Alarm resource gives Monasca API the ability to query from database to get all the group titles under a specific alarm manager id. Also we need to add “list grouped alarms” to query the database to get all the grouped(hidden) alarms under one group title using the group title id.
1. List alarm groups
  1.1. GET/alarm_groups
  1.2. Query parameter: alarm_group_id
2. List grouped alarms
  2.1. GET/grouped-alarms/{alarm_group_id}
  2.2. Path parameter: alarm_group_id

Similar to alarm grouping manager, alarm silencing manager and alarm inhibition manager will have the same operations. The main difference will be in POST:
For creating alarm silencing manager, the request body will include:
1. Name
2. Matchers: e.g. {alarm name: cpu percent high, hostname: host1, …}
3. Start time: the start time to apply silencing rules
4. End time: expire time for silencing rules

For creating alarm inhibition manager, the request body will include:
1. Name
2. Source match
3. Target match
4. Equal
5. Exclusions
For example, when the inhibition manager has source match = {‘severity’: ‘HIGH’}, target match = {‘severity’: ‘LOW’}, and equal = [‘alarm name’], all the alarms have the same alarm name will send notifications if their severity is HIGH and at the same time mute any LOW severity level alarms.

In the alarm resource of Monasca-API, “list inhibition source alarms”, “list inhibition target alarms” and “list silenced alarms” are needed. “list inhibition source alarms” will give the ability to query all the source alarms under the same inhibition manager. “list inhibition target alarms” will show all the target alarms that are hidden under one specific source alarm. “list silenced alarms” will show all the alarms that are currently silenced.
1. List inhibition source alarms
  1.1. GET/inhibition-source-alarms/{alarm_inhibition_manager_id}
  1.2. Path parameter: alarm_inhibition_manager_id
2. List inhibition target alarms
  2.1. GET/inhibition-target-alarms/{inhibition_source_alarm_id}
  2.2. Path parameter: inhibition_source_alarm_id
3. List silenced alarms
  3.1. GET/silenced-alarms
  3.2. Query parameter: alarm_silencing_manager_id

Blueprint information

Status:
Not started
Approver:
None
Priority:
High
Drafter:
Kaiyan
Direction:
Needs approval
Assignee:
Kaiyan
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Addressed by: https://review.openstack.org/432499
    [WIP]Add API resource for alarm grouping manager

Addressed by: https://review.openstack.org/435632
    [WIP] Add API Resource for Alarm Inhibition Manager

Addressed by: https://review.openstack.org/436698
    [WIP] Add API Resource for Alarm Silencing Manager

Gerrit topic: https://review.openstack.org/#q,topic:bp/alarm-manager-resource,n,z

Addressed by: https://review.openstack.org/458962
    Add API Resource for Alarm Group Definition

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.