diff --git a/server/notification-providers/flashduty.js b/server/notification-providers/flashduty.js index c340ed06f..bac6f07ca 100644 --- a/server/notification-providers/flashduty.js +++ b/server/notification-providers/flashduty.js @@ -73,13 +73,13 @@ class FlashDuty extends NotificationProvider { } const options = { method: "POST", - url: "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" + notification.flashdutyIntegrationKey, + url: notification.flashdutyIntegrationKey.startsWith("http") ? notification.flashdutyIntegrationKey : "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" + notification.flashdutyIntegrationKey, headers: { "Content-Type": "application/json" }, data: { description: `[${title}] [${monitorInfo.name}] ${body}`, title, event_status: eventStatus || "Info", - alert_key: String(monitorInfo.id) || Math.random().toString(36).substring(7), + alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7), labels, } }; diff --git a/src/components/notifications/FlashDuty.vue b/src/components/notifications/FlashDuty.vue index a66ada013..36eeff5f1 100644 --- a/src/components/notifications/FlashDuty.vue +++ b/src/components/notifications/FlashDuty.vue @@ -1,7 +1,10 @@