Incidents.Severity
A Better Stack severity: a named alerting level, such as low or high, that
sets how people are alerted (phone call, SMS, e-mail, push, critical alert)
when an EscalationPolicy step uses it through its severityId.
Creating a severity alerts nobody; only an incident escalated through a
step that uses it does.
Every prop updates in place; teamId replaces the severity. name
defaults to a generated unique name. Removing severityGroupId takes the
severity out of its SeverityGroup. A severity referenced by a policy
step can’t be deleted until the step changes, so delete the policy first
(Alchemy does, when the policy references severity.id).
Creating a severity
Section titled “Creating a severity”An e-mail-only severity for low-urgency alerts
const low = yield* BetterStack.Incidents.Severity("low", { name: "Low", email: true, push: false, sms: false, call: false,});Using a severity in an escalation policy
Section titled “Using a severity in an escalation policy”Page the on-call person with a critical alert
const critical = yield* BetterStack.Incidents.Severity("critical", { name: "Critical", call: true, push: true, criticalAlert: true,});yield* BetterStack.Incidents.EscalationPolicy("on-call", { name: "On-call", steps: [ { type: "escalation", waitBefore: 0, severityId: critical.id, stepMembers: [{ type: "current_on_call" }], }, ],});call boolean
Whether escalation policy steps with this severity alert people by phone call. Each person can override this in their own notification settings.
criticalAlert boolean
Whether escalation policy steps with this severity send a critical alert, a push notification that ignores the mute switch and Do Not Disturb mode.
email boolean
Whether escalation policy steps with this severity alert people by e-mail. Each person can override this in their own notification settings.
name string
The severity's name, unique within the team, ignoring case. Defaults to a unique name generated from the stack, stage and logical id.
push boolean
Whether escalation policy steps with this severity alert people by push notification. Each person can override this in their own notification settings.
severityGroupId string | null
The ID of the severity group this severity belongs to, or null when it's in none. Get the ID via List severity groups.
sms boolean
Whether escalation policy steps with this severity alert people by SMS. Each person can override this in their own notification settings.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
Attributes
Section titled “Attributes”id string always set
The severity's id.
call boolean
Whether escalation policy steps with this severity alert people by phone call. Each person can override this in their own notification settings.
criticalAlert boolean
Whether escalation policy steps with this severity send a critical alert, a push notification that ignores the mute switch and Do Not Disturb mode.
email boolean
Whether escalation policy steps with this severity alert people by e-mail. Each person can override this in their own notification settings.
name string
The severity's name, unique within the team, ignoring case.
push boolean
Whether escalation policy steps with this severity alert people by push notification. Each person can override this in their own notification settings.
severityGroupId string | null
The ID of the severity group this severity belongs to, or null when it's in none. Get the ID via List severity groups.
sms boolean
Whether escalation policy steps with this severity alert people by SMS. Each person can override this in their own notification settings.
teamId string
Team that owns this severity, such as t123.
teamName string
Name of the team that owns this severity.
Lookup
Section titled “Lookup”Severity.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
teamId string
Team that owns it, such as t123. Defaults to the credentials' team.