Alerting: Enable sending notifications to a specific topic on Telegram (#79546)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Gokhan
2024-02-06 18:19:22 +03:00
committed by GitHub
parent ce12eba858
commit cf601fab09
4 changed files with 15 additions and 3 deletions

View File

@@ -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"`

View File

@@ -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,