Api reference
components.alerting.public.commands ¶
alert ¶
execute_database_alerts ¶
Check all database alerts
Source code in components/alerting/public/commands/alert.py
execute_datadog_alerts ¶
Check all datadog alerts
Source code in components/alerting/public/commands/alert.py
execute_datadog_security_signals ¶
Check all datadog security signals
Source code in components/alerting/public/commands/alert.py
execute_turing_alerts ¶
Check all turing alerts
Source code in components/alerting/public/commands/alert.py
components.alerting.public.config ¶
ALERT_OWNER_TYPE_CONFIGS
module-attribute
¶
ALERT_OWNER_TYPE_CONFIGS = key_by(
[
AlertOwnerTypeConfig(
owner_type=claims_eng,
linear_team_id=LINEAR_CLAIM_MANAGEMENT_TEAM_ID,
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=True,
oncall_group_id="c6f195e7-97ea-422b-81cb-e1590eaeedfa",
),
AlertOwnerTypeConfig(
owner_type=be_claims_eng,
linear_team_id="d082a240-cb82-4263-9e97-595c499bb9bd",
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=True,
oncall_group_id="c6f195e7-97ea-422b-81cb-e1590eaeedfa",
),
AlertOwnerTypeConfig(
owner_type=be_css,
linear_team_id="ae99e1c1-5890-48aa-b94b-aaa4b781c7fb",
linear_label_id=None,
set_sla=True,
set_assignee=True,
oncall_group_id="b33c611b-f18a-4423-9819-9c1032ed411b",
),
AlertOwnerTypeConfig(
owner_type=claims_ops,
linear_team_id="f00713d2-9b4b-4084-8cb4-128a184952fe",
linear_label_id=None,
set_sla=False,
set_assignee=False,
oncall_group_id="3108c43f-af41-4c6a-8c71-b7e8aedd0f6d",
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=civil_servant_css,
linear_team_id="9147f735-6b38-48b0-b30b-cb5f8985b657",
linear_label_id=None,
set_sla=False,
set_assignee=False,
),
AlertOwnerTypeConfig(
owner_type=infra_eng,
linear_team_id="b43e41e1-36dc-4d5e-b6c4-d289a4aa5e40",
linear_label_id="312875f3-d653-4222-87be-8499ed62ed9b",
set_sla=True,
set_assignee=True,
oncall_group_id="ea888900-6825-4b25-b322-0e931d210c93",
),
AlertOwnerTypeConfig(
owner_type=dx_eng,
linear_team_id="e709f9e0-a622-40bf-ae4e-f92c17167315",
linear_label_id="312875f3-d653-4222-87be-8499ed62ed9b",
set_sla=True,
set_assignee=True,
oncall_group_id="3ffdd5a1-215f-4263-bbe9-74d0331eade9",
),
AlertOwnerTypeConfig(
owner_type=member_life_cycle,
linear_team_id="a1852c1e-57fb-4a23-b808-c8b7ff50a2d7",
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=False,
),
AlertOwnerTypeConfig(
owner_type=affiliation_eng,
linear_team_id="651266da-11b7-47f7-bebf-00203a8fc704",
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=True,
oncall_group_id="5c604784-b3ad-4b3f-b6ce-0d5c20926010",
),
AlertOwnerTypeConfig(
owner_type=affiliation_care,
linear_team_id="c5caebd8-e12a-4d5f-9ae7-ef1eb347dceb",
linear_label_id=None,
set_sla=False,
set_assignee=True,
oncall_group_id="aca16e4e-ef8a-4f45-8b8f-3ed5362995d4",
),
AlertOwnerTypeConfig(
owner_type=contract_lifecycle_eng,
linear_team_id="806dc0ff-e14a-482f-a54b-de6c480c505a",
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=False,
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=contract_lifecycle_ops,
linear_team_id="806dc0ff-e14a-482f-a54b-de6c480c505a",
linear_label_id="a594db89-26e6-414b-a6a4-51c57bc66d52",
set_sla=True,
set_assignee=False,
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=billing_eng,
linear_team_id="342b6487-4d8e-4e25-9d1e-6c48b2aa9e11",
linear_label_id=None,
set_sla=True,
set_assignee=True,
oncall_group_id="795be8b9-ad53-4d06-884c-dae82db41de5",
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=security,
linear_team_id="1bf0d33c-9019-4ac6-ad15-03479c90e3f9",
linear_label_id="d61e237b-f159-42e1-8c7d-60c3663683a4",
set_sla=True,
set_assignee=True,
oncall_group_id="efccde79-8ae4-4221-a91a-cfcae5d10d3a",
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=data_oncall,
linear_team_id="42b2a1cf-d19b-47ac-96f7-039bbf0656e7",
linear_project_id="b8742e8a-49d2-470d-b615-c50cc27481ed",
linear_label_id=None,
set_sla=False,
set_assignee=False,
),
AlertOwnerTypeConfig(
owner_type=testing,
linear_team_id="201a79b2-97df-451f-b724-9d3dbc727513",
linear_label_id=None,
set_sla=False,
set_assignee=False,
),
],
key_fn=lambda config: owner_type,
)
AlertOwnerTypeConfig
dataclass
¶
AlertOwnerTypeConfig(
owner_type,
linear_team_id,
linear_label_id,
set_sla,
set_assignee,
linear_project_id=None,
oncall_group_id=None,
status_when_opened=StatusWhenOpenedEnum.todo,
)
Configures how Linear issues (aka tickets) are managed according to alert's owner type
linear_label_id
instance-attribute
¶
Optional Linear label ID to add on Linear issues For example, useful to differentiate oncall tickets from others.
linear_project_id
class-attribute
instance-attribute
¶
Linear project UUID. Optional, if not set, the issue will be created at the team level π‘Tip: In Linear, Press β + K, Select "Developer: Copy Model UUI"
linear_team_id
instance-attribute
¶
Linear team UUID. π‘Tip: In Linear, Press β + K, Select "Developer: Copy Model UUI"
oncall_group_id
class-attribute
instance-attribute
¶
Only needed if set_assignee is True to get the current oncall person. Must be one of the ID of OncallGroupShift cf. https://home.alan.com/on-call β§
set_assignee
instance-attribute
¶
Automatically assign Linear issues to the current oncall person
set_sla
instance-attribute
¶
Automatically set an SLA on ALL Linear issues created in the Linear team with the label (if set) Including those not created by the alerting system
status_when_opened
class-attribute
instance-attribute
¶
Default status to set on Linear issues
LINEAR_ISSUE_SOURCE_TYPE_CONFIGS
module-attribute
¶
LINEAR_ISSUE_SOURCE_TYPE_CONFIGS = key_by(
[
LinearIssueSourceTypeConfig(
source_type=ad_hoc,
linear_label_id="34cc0a26-6776-41ae-82a0-266353b971f5",
default_resolution_time_in_hours=5 * 24,
),
LinearIssueSourceTypeConfig(
source_type=database_alert,
linear_label_id="22dc9773-4b03-488f-9741-f088c19dd121",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=turing_alert,
linear_label_id="8a5d073c-4ffe-41e0-96a1-6c133cc4725d",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=datadog_alert,
linear_label_id="4149c240-52f6-4303-8081-43ed772b00ec",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=intercom_conversation,
linear_label_id=LINEAR_INTERCOM_CONVERSATION_LABEL_ID,
default_resolution_time_in_hours=3 * 24,
),
LinearIssueSourceTypeConfig(
source_type=datadog_security_signals,
linear_label_id="f90f9a9e-5c61-402b-a177-39c734245380",
default_resolution_time_in_hours=None,
),
],
key_fn=lambda config: source_type,
)
LinearIssueSourceTypeConfig
dataclass
¶
Configures how Linear issues (aka tickets) are managed according to source type
MAX_EXCESS_ALERTS_INSTANCE_IDS_DISPLAYED
module-attribute
¶
ONCALL_LINEAR_ISSUE_STATE_NAME_WHEN_CLOSED
module-attribute
¶
components.alerting.public.entities ¶
alert_owner_type ¶
alert_severity ¶
AlertSeverity ¶
Bases: AlanBaseEnum
Severity of alert - will also set Linear priority