From fad7621d421b38afafbcb8678a002e4ed8ddd1e8 Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Mon, 3 Aug 2026 14:40:15 +0100 Subject: [PATCH] feat: Removed email alert settings --- models/settings.go | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/models/settings.go b/models/settings.go index 6b9b384..9ea06b2 100644 --- a/models/settings.go +++ b/models/settings.go @@ -6,21 +6,13 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" ) +// AlertSettings no longer carries a webhook URL or SMTP configuration of its +// own. Agent-offline alerts are delivered through notification channels, the +// same destinations monitors use, so there is one place to configure a +// destination and one place to test it. type AlertSettings struct { - Enabled bool `bson:"enabled" json:"enabled"` - WebhookURL string `bson:"webhook_url" json:"webhook_url"` - OfflineThresholdMinutes int `bson:"offline_threshold_minutes" json:"offline_threshold_minutes"` -} - -type EmailSettings struct { - Enabled bool `bson:"enabled" json:"enabled"` - SMTPHost string `bson:"smtp_host" json:"smtp_host"` - SMTPPort int `bson:"smtp_port" json:"smtp_port"` - Username string `bson:"username" json:"username"` - Password string `bson:"password" json:"password"` - FromAddr string `bson:"from_addr" json:"from_addr"` - ToAddrs []string `bson:"to_addrs" json:"to_addrs"` - UseTLS bool `bson:"use_tls" json:"use_tls"` + OfflineThresholdMinutes int `bson:"offline_threshold_minutes" json:"offline_threshold_minutes"` + OfflineChannelIDs []string `bson:"offline_channel_ids" json:"offline_channel_ids"` } type SecretsSettings struct { @@ -33,7 +25,6 @@ type Settings struct { ID bson.ObjectID `bson:"_id,omitempty" json:"-"` InstanceID string `bson:"instance_id" json:"instance_id"` Alerts AlertSettings `bson:"alerts" json:"alerts"` - Email EmailSettings `bson:"email" json:"email"` Secrets SecretsSettings `bson:"secrets" json:"secrets"` WorkflowLogRetentionDays *int `bson:"workflow_log_retention_days,omitempty" json:"workflow_log_retention_days,omitempty"`