Skip to content

Commit

Permalink
fix(pagerduty): ALERT_STATUS_MAP (#2447)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Nov 12, 2024
1 parent e9e401c commit 55f574d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions keep/providers/pagerduty_provider/pagerduty_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,12 @@ def _query(self, incident_id: str = None):
)

def _format_alert(
self, event: dict, provider_instance: "BaseProvider" = None
event: dict, provider_instance: "BaseProvider" = None
) -> AlertDto:
status = self.ALERT_STATUS_MAP.get(event.get("status", "firing"))
severity = self.ALERT_SEVERITIES_MAP.get(event.get("severity", "info"))
status = PagerdutyProvider.ALERT_STATUS_MAP.get(event.get("status", "firing"))
severity = PagerdutyProvider.ALERT_SEVERITIES_MAP.get(
event.get("severity", "info")
)
source = ["pagerduty"]
origin = event.get("body", {}).get("cef_details", {}).get("source_origin")
fingerprint = event.get("alert_key", event.get("id"))
Expand Down

0 comments on commit 55f574d

Please sign in to comment.