Alerting: Option for Discord notifier to use webhook name (#40463)

* Added an option to discord notifier to use discord's webhook name (useful for customizing notifications).

* Support ngalert system with discord username toggle

* Added ngalert discord test

* Apply suggestions from code review

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Docs updated with discord username setting

* Fix api integration test

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
Skye
2021-10-26 11:55:10 -07:00
committed by GitHub
parent dfbb3c4e23
commit bce1011361
7 changed files with 103 additions and 32 deletions

View File

@@ -694,6 +694,12 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
InputType: alerting.InputTypeText,
PropertyName: "avatar_url",
},
{
Label: "Use Discord's Webhook Username",
Description: "Use the username configured in Discord's webhook settings. Otherwise, the username will be 'Grafana'",
Element: alerting.ElementTypeCheckbox,
PropertyName: "use_discord_username",
},
},
},
{