Api reference
components.alerting.public.commands ¶
alert ¶
execute_alerts ¶
Check alerts from the specified source.
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=be_claims_ops,
linear_team_id=BE_CLAIMS_ON_CALL_LINEAR_TEAM_ID,
linear_label_id=None,
set_sla=False,
set_assignee=False,
oncall_group_id="4568f2ba-763a-417d-9bf8-02945178e887",
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,
status_when_closed=support_done,
),
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_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,
),
AlertOwnerTypeConfig(
owner_type=customer_admin_eng,
linear_team_id="6969c7ae-0c32-4802-b8db-f16eabac8011",
linear_label_id=None,
set_sla=False,
set_assignee=False,
),
AlertOwnerTypeConfig(
owner_type=support_eng,
linear_team_id="23c5d9e7-69e9-476c-ac6e-8a362e6a858d",
linear_label_id=None,
set_sla=False,
set_assignee=False,
status_when_opened=triage,
),
AlertOwnerTypeConfig(
owner_type=prevoyance_eng,
linear_team_id="fe118449-4559-4a54-8623-177bd70ea8d3",
linear_label_id=LINEAR_ENG_ONCALL_LABEL_ID,
set_sla=True,
set_assignee=True,
oncall_group_id="49e2f157-6626-4e8f-8c74-2bcc94d87e4f",
status_when_opened=triage,
),
],
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,
status_when_closed=StatusWhenClosedEnum.done,
)
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_closed
class-attribute
instance-attribute
¶
Status to set on Linear issues when closed
status_when_opened
class-attribute
instance-attribute
¶
Status to set on Linear issues when opened
LINEAR_ISSUE_SOURCE_TYPE_CONFIGS
module-attribute
¶
LINEAR_ISSUE_SOURCE_TYPE_CONFIGS = key_by(
[
LinearIssueSourceTypeConfig(
source_type=ad_hoc,
linear_label_id="1d108e41-227e-4124-9340-49886fbff278",
default_resolution_time_in_hours=5 * 24,
),
LinearIssueSourceTypeConfig(
source_type=database_alert,
linear_label_id="6dbb1c75-3d67-428f-ab2b-bf32f55d54c8",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=datadog_alert,
linear_label_id="77650c94-5776-48b0-830f-073e0c2993c4",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=datadog_security_signals,
linear_label_id="76e81efe-8b42-46db-af30-6af455d4eb26",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=datadog_synthetic_test,
linear_label_id="c1a98698-6855-454c-b3ad-0bfe6f97c21a",
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=turing_alert,
linear_label_id="ee74785c-7960-4987-b80f-0557910da8d9",
default_resolution_time_in_hours=None,
),
LinearIssueSourceTypeConfig(
source_type=waldo_alert,
linear_label_id="024af28c-080f-4c03-81ae-dbd7a8d423b2",
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
¶
StatusWhenClosedEnum ¶
components.alerting.public.entities ¶
alert_owner_type ¶
alert_severity ¶
AlertSeverity ¶
Bases: AlanBaseEnum
Severity of alert - will also set Linear priority