Alert Processing
by Paul Sadauskas
1. Alarm App
1.1. /escalation_definitions
1.1.1. /steps
1.2. /maintenance_window_definitions
1.2.1. ?open
1.3. /escalations
1.3.1. /current_alerts
1.3.2. /notification_results
1.3.3. /messages
1.3.4. /state_changes
1.3.5. /step_changes
2. Alert Import
2.1. POST /alerts
2.1.1. retrieve matching filters w/ purpose MWDef
2.1.1.1. any m.filters in mw.filters?
2.1.1.1.1. yes: discard alert
2.1.2. retrieve matching filters w/ purpose EscDef
2.1.2.1. any m.filters in ed.filters?
2.1.2.1.1. yes
2.1.2.1.2. no: discard alert
3. Escalation Monitor
3.1. poll 15s: /escalations?state=new
3.1.1. spawn worker
3.1.1.1. update state: open
3.1.1.2. fetch escalation
3.1.1.3. check if in maint
3.1.1.3.1. yes: update state: in maint
3.1.1.3.2. no: update state: prior state
3.1.1.4. check state
3.1.1.4.1. in_maint
3.1.1.4.2. open
3.1.1.4.3. ack
3.1.1.4.4. susp
3.1.1.4.5. closed
3.1.1.5. check if end of steps
3.1.1.5.1. yes
3.1.1.5.2. no