Skip to content

Commit

Permalink
fix(provider): incidentmanager name and id
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed May 5, 2024
1 parent 4573753 commit 05bd221
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
from typing import Optional
from urllib.parse import urlparse
from uuid import uuid4

import boto3
import pydantic
Expand Down Expand Up @@ -435,12 +436,13 @@ def _format_alert(
severity = IncidentmanagerProvider.SEVERITIES_MAP.get(alert.get("IMPACT"), 5)

return AlertDto(
id=alert.get("arn"),
name=alert.get("title"),
id=alert.get("arn", str(uuid4())),
name=alert.get("title", alert.get("alertname")),
status=status,
severity=severity,
lastReceived=str(alert.get("creationTime")),
description=alert.get("summary"),
url=alert.pop("url", alert.get("generatorURL")),
source=["incidentmanager"],
**alert,
)
Expand Down

0 comments on commit 05bd221

Please sign in to comment.