diff --git a/pkg/services/alerting/notifiers/webhook.go b/pkg/services/alerting/notifiers/webhook.go
index 60a2aa90bef..8d5f3f2a6ea 100644
--- a/pkg/services/alerting/notifiers/webhook.go
+++ b/pkg/services/alerting/notifiers/webhook.go
@@ -16,26 +16,48 @@ func init() {
Heading: "Webhook settings",
Factory: NewWebHookNotifier,
OptionsTemplate: `
-
Webhook settings
-
- Url
-
-
-
-
- Username
-
-
-
- Password
-
-
+ Webhook settings
+
+ Url
+
+
+
+
+
`,
Options: []alerting.NotifierOption{
{
@@ -84,11 +106,14 @@ func NewWebHookNotifier(model *models.AlertNotification) (alerting.Notifier, err
return nil, alerting.ValidationError{Reason: "Could not find url property in settings"}
}
+ username := model.DecryptedValue("username", model.Settings.Get("username").MustString())
+ password := model.DecryptedValue("password", model.Settings.Get("password").MustString())
+
return &WebhookNotifier{
NotifierBase: NewNotifierBase(model),
URL: url,
- User: model.Settings.Get("username").MustString(),
- Password: model.Settings.Get("password").MustString(),
+ User: username,
+ Password: password,
HTTPMethod: model.Settings.Get("httpMethod").MustString("POST"),
log: log.New("alerting.notifier.webhook"),
}, nil