Monasca API Alarm Manager Resources
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-
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
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
1.2.6. Alarm_actions
1.2.7. OK_actions
1.2.8. UNDETERMINED_
2. List alarm grouping manager
2.1. GET/alarm-
2.2. Query parameter: name
3. Get alarm grouping manager
3.1. GET/alarm-
3.2. Path parameter: alarm_manager_id
4. Update alarm manager
4.1. PUT/alarm-
4.2. Path parameter: alarm_manager_id
5. Patch alarm manager
5.1. PATCH/alarm-
5.2. Path parameter: alarm_manager_id
6. Delete alarm manager
6.1. DELETE/ alarm-grouping-
6.2. Path parameter: alarm_grouping_
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-
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-
1.2. Path parameter: alarm_inhibitio
2. List inhibition target alarms
2.1. GET/inhibition-
2.2. Path parameter: inhibition_
3. List silenced alarms
3.1. GET/silenced-alarms
3.2. Query parameter: alarm_silencing
Whiteboard
Addressed by: https:/
[WIP]Add API resource for alarm grouping manager
Addressed by: https:/
[WIP] Add API Resource for Alarm Inhibition Manager
Addressed by: https:/
[WIP] Add API Resource for Alarm Silencing Manager
Gerrit topic: https:/
Addressed by: https:/
Add API Resource for Alarm Group Definition
Work Items
Dependency tree
* Blueprints in grey have been implemented.