feat(alerting): Add new providers for Datadog, IFTTT, Line, NewRelic, Plivo, RocketChat, SendGrid, Signal, SIGNL4, Splunk, Squadcast, Vonage, Webex and Zapier (#1224)

* feat(alerting): Add new providers for Datadog, IFTTT, Line, NewRelic, Plivo, RocketChat, SendGrid, Signal, SIGNL4, Splunk, Squadcast, Vonage, Webex and Zapier

Relevant: https://github.com/TwiN/gatus/discussions/1223

Fixes #1073
Fixes #1074

* chore: Clean up code

* docs: Fix table formatting

* Update alerting/provider/datadog/datadog.go

* Update alerting/provider/signal/signal.go

* Update alerting/provider/ifttt/ifttt.go

* Update alerting/provider/newrelic/newrelic.go

* Update alerting/provider/squadcast/squadcast.go

* Update alerting/provider/squadcast/squadcast.go
This commit is contained in:
TwiN
2025-08-25 13:22:17 -04:00
committed by GitHub
parent 6e888430fa
commit a49b9145d2
39 changed files with 7321 additions and 84 deletions

View File

@@ -8,18 +8,26 @@ import (
"github.com/TwiN/gatus/v5/alerting"
"github.com/TwiN/gatus/v5/alerting/alert"
"github.com/TwiN/gatus/v5/alerting/provider/custom"
"github.com/TwiN/gatus/v5/alerting/provider/datadog"
"github.com/TwiN/gatus/v5/alerting/provider/discord"
"github.com/TwiN/gatus/v5/alerting/provider/email"
"github.com/TwiN/gatus/v5/alerting/provider/ifttt"
"github.com/TwiN/gatus/v5/alerting/provider/jetbrainsspace"
"github.com/TwiN/gatus/v5/alerting/provider/line"
"github.com/TwiN/gatus/v5/alerting/provider/matrix"
"github.com/TwiN/gatus/v5/alerting/provider/mattermost"
"github.com/TwiN/gatus/v5/alerting/provider/messagebird"
"github.com/TwiN/gatus/v5/alerting/provider/newrelic"
"github.com/TwiN/gatus/v5/alerting/provider/pagerduty"
"github.com/TwiN/gatus/v5/alerting/provider/plivo"
"github.com/TwiN/gatus/v5/alerting/provider/pushover"
"github.com/TwiN/gatus/v5/alerting/provider/signl4"
"github.com/TwiN/gatus/v5/alerting/provider/slack"
"github.com/TwiN/gatus/v5/alerting/provider/teams"
"github.com/TwiN/gatus/v5/alerting/provider/telegram"
"github.com/TwiN/gatus/v5/alerting/provider/twilio"
"github.com/TwiN/gatus/v5/alerting/provider/vonage"
"github.com/TwiN/gatus/v5/alerting/provider/zapier"
"github.com/TwiN/gatus/v5/config"
"github.com/TwiN/gatus/v5/config/endpoint"
)
@@ -268,6 +276,17 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "datadog",
AlertType: alert.TypeDatadog,
AlertingConfig: &alerting.Config{
Datadog: &datadog.AlertProvider{
DefaultConfig: datadog.Config{
APIKey: "test-key",
},
},
},
},
{
Name: "discord",
AlertType: alert.TypeDiscord,
@@ -294,6 +313,18 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "ifttt",
AlertType: alert.TypeIFTTT,
AlertingConfig: &alerting.Config{
IFTTT: &ifttt.AlertProvider{
DefaultConfig: ifttt.Config{
WebhookKey: "test-key",
EventName: "test-event",
},
},
},
},
{
Name: "jetbrainsspace",
AlertType: alert.TypeJetBrainsSpace,
@@ -307,6 +338,18 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "line",
AlertType: alert.TypeLine,
AlertingConfig: &alerting.Config{
Line: &line.AlertProvider{
DefaultConfig: line.Config{
ChannelAccessToken: "test-token",
UserIDs: []string{"test-user"},
},
},
},
},
{
Name: "mattermost",
AlertType: alert.TypeMattermost,
@@ -331,6 +374,18 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "newrelic",
AlertType: alert.TypeNewRelic,
AlertingConfig: &alerting.Config{
NewRelic: &newrelic.AlertProvider{
DefaultConfig: newrelic.Config{
InsertKey: "test-key",
AccountID: "test-account",
},
},
},
},
{
Name: "pagerduty",
AlertType: alert.TypePagerDuty,
@@ -342,6 +397,20 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "plivo",
AlertType: alert.TypePlivo,
AlertingConfig: &alerting.Config{
Plivo: &plivo.AlertProvider{
DefaultConfig: plivo.Config{
AuthID: "test-id",
AuthToken: "test-token",
From: "test-from",
To: []string{"test-to"},
},
},
},
},
{
Name: "pushover",
AlertType: alert.TypePushover,
@@ -354,6 +423,17 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "signl4",
AlertType: alert.TypeSIGNL4,
AlertingConfig: &alerting.Config{
SIGNL4: &signl4.AlertProvider{
DefaultConfig: signl4.Config{
TeamSecret: "test-secret",
},
},
},
},
{
Name: "slack",
AlertType: alert.TypeSlack,
@@ -402,6 +482,31 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
},
},
},
{
Name: "vonage",
AlertType: alert.TypeVonage,
AlertingConfig: &alerting.Config{
Vonage: &vonage.AlertProvider{
DefaultConfig: vonage.Config{
APIKey: "test-key",
APISecret: "test-secret",
From: "test-from",
To: []string{"test-to"},
},
},
},
},
{
Name: "zapier",
AlertType: alert.TypeZapier,
AlertingConfig: &alerting.Config{
Zapier: &zapier.AlertProvider{
DefaultConfig: zapier.Config{
WebhookURL: "https://example.com",
},
},
},
},
{
Name: "matrix",
AlertType: alert.TypeMatrix,