Models¶
Handling incidents¶
- Incident¶
An :index:incident is stored in the Incident model.
- SourceSystem¶
This model hosts the definition of the source that created the incident.
- SourceSystemType¶
A source has a type, for easier filtering on sources. Not used much.
- Event¶
Events on an incident are stored in the Event model. The type-field is an enum.
- Acknowledgment¶
This model only hosts an optional field: expiration, used by the index: event-subtype Acknowldegment.
- Tag¶
An
Incident
may have one or moreTag
s. Stored askey
,value
to make for cheap lookups on either, shown everywhere askey=value
.- Preferences¶
A place to store user preferences, not yet in use. Namespaced.
- IncidentTagRelation¶
Connects
Tag
s to theirIncident
s. Unnecessarily complicated, we haven’t gotten around to simplifying it yet.Note
We are considering removing this model but it is a very low priority. PR’s welcome.
- IncidentRelation¶
Not in use
- IncidentRelationType¶
Not in use
Handling notifications¶
- NotificationProfile¶
Holds the data needed for sending a notification to a given destination for a new or changed incident that happens during a specified time range, the timeslot.
- Filter¶
Holds the actual filter, stored in the field
filter
as JSON. The actual structure and validation of the JSON is customizable.Note
We are considering moving this to a separate app since it is used for more than selecting which destinations to send notifications to. This’ll take several migrations over several releases so we’d prefer to do this ourselves.
- Timeslot¶
Holds a collection of one or more
TimeRecurrence
s. To cover multiple spans of time during the same day you need more than oneTimeRecurrence
.- TimeRecurrence¶
Holds a single, continuous duration of time (via the
start
,end
-fields) used for one or moredays
, stored as an array of integers, with Monday as day 1.- DestinationConfig¶
Holds the settings for a specific destination, in a format specific to that destination. Examples: phone numbers, email addresses, webhooks. The settings are stored in the
settings
-field as JSON. Validation and serialization is handled by notification plugins.- Media¶
Holds a
DestinationConfig
’s type. Theinstalled
-field is updated on startup to keep track of whichnotification plugin
s are installed.