diff --git a/go.mod b/go.mod index 7bfe2626a12..62ab1e851cc 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/google/uuid v1.5.0 // @grafana/backend-platform github.com/google/wire v0.5.0 // @grafana/backend-platform github.com/gorilla/websocket v1.5.0 // @grafana/grafana-app-platform-squad - github.com/grafana/alerting v0.0.0-20240201111525-bd6396bbe2e1 // @grafana/alerting-squad-backend + github.com/grafana/alerting v0.0.0-20240202155917-ec2c02267fa5 // @grafana/alerting-squad-backend github.com/grafana/cuetsy v0.1.11 // @grafana/grafana-as-code github.com/grafana/grafana-aws-sdk v0.23.1 // @grafana/aws-datasources github.com/grafana/grafana-azure-sdk-go v1.12.0 // @grafana/partner-datasources diff --git a/go.sum b/go.sum index b4c297e8d29..de5e797a0ae 100644 --- a/go.sum +++ b/go.sum @@ -1916,6 +1916,8 @@ github.com/gotestyourself/gotestyourself v1.3.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzV github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/grafana/alerting v0.0.0-20240201111525-bd6396bbe2e1 h1:xxtCQ02pBCzzr1GNZo2fUVrJLQZ9X/vp6rigDRN6PMo= github.com/grafana/alerting v0.0.0-20240201111525-bd6396bbe2e1/go.mod h1:WMFwxILmCOpaeHe9xP/2v7fxRMStGcW4t2Iuc97Oi6k= +github.com/grafana/alerting v0.0.0-20240202155917-ec2c02267fa5 h1:gt514QzadNdnaNKm4DcmDo3ph0M7Hhg1+sdMEhPFVrA= +github.com/grafana/alerting v0.0.0-20240202155917-ec2c02267fa5/go.mod h1:WMFwxILmCOpaeHe9xP/2v7fxRMStGcW4t2Iuc97Oi6k= github.com/grafana/codejen v0.0.3 h1:tAWxoTUuhgmEqxJPOLtJoxlPBbMULFwKFOcRsPRPXDw= github.com/grafana/codejen v0.0.3/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s= github.com/grafana/cue v0.0.0-20230926092038-971951014e3f h1:TmYAMnqg3d5KYEAaT6PtTguL2GjLfvr6wnAX8Azw6tQ= diff --git a/pkg/services/ngalert/api/tooling/definitions/contact_points.go b/pkg/services/ngalert/api/tooling/definitions/contact_points.go index 5797c0314b3..b5569aa2845 100644 --- a/pkg/services/ngalert/api/tooling/definitions/contact_points.go +++ b/pkg/services/ngalert/api/tooling/definitions/contact_points.go @@ -188,8 +188,9 @@ type SlackIntegration struct { type TelegramIntegration struct { DisableResolveMessage *bool `json:"-" yaml:"-" hcl:"disable_resolve_message"` - BotToken Secret `json:"bottoken" yaml:"bottoken" hcl:"token"` - ChatID string `json:"chatid,omitempty" yaml:"chatid,omitempty" hcl:"chat_id"` + BotToken Secret `json:"bottoken" yaml:"bottoken" hcl:"token"` + ChatID string `json:"chatid,omitempty" yaml:"chatid,omitempty" hcl:"chat_id"` + MessageThreadID string `json:"message_thread_id,omitempty" yaml:"message_thread_id,omitempty" hcl:"message_thread_id"` Message *string `json:"message,omitempty" yaml:"message,omitempty" hcl:"message"` ParseMode *string `json:"parse_mode,omitempty" yaml:"parse_mode,omitempty" hcl:"parse_mode"` diff --git a/pkg/services/ngalert/notifier/channels_config/available_channels.go b/pkg/services/ngalert/notifier/channels_config/available_channels.go index 5fac854bc10..b05138a79c4 100644 --- a/pkg/services/ngalert/notifier/channels_config/available_channels.go +++ b/pkg/services/ngalert/notifier/channels_config/available_channels.go @@ -815,6 +815,15 @@ func GetAvailableNotifiers() []*NotifierPlugin { PropertyName: "chatid", Required: true, }, + { + Label: "Message Thread ID", + Element: ElementTypeInput, + InputType: InputTypeText, + Description: "Integer Telegram Message Thread Identifier", + PropertyName: "message_thread_id", + Required: false, + ValidationRule: "-?[0-9]{1,10}", + }, { // New in 8.0. Label: "Message", Element: ElementTypeTextArea,