[Alerting]: alertmanager notifier fixes (#34575) (#34589)

(cherry picked from commit b48832c0f7)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-05-24 17:32:52 +03:00
committed by GitHub
co-authored by Sofia Papagiannaki
parent 01c5587eda
commit ec09a5995d
3 changed files with 49 additions and 2 deletions
@@ -442,6 +442,8 @@ func (am *Alertmanager) buildReceiverIntegrations(receiver *apimodels.PostableAp
n, err = channels.NewThreemaNotifier(cfg, tmpl)
case "opsgenie":
n, err = channels.NewOpsgenieNotifier(cfg, tmpl)
case "prometheus-alertmanager":
n, err = channels.NewAlertmanagerNotifier(cfg, tmpl)
default:
return nil, fmt.Errorf("notifier %s is not supported", r.Type)
}
@@ -638,7 +638,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
},
},
{
Type: "alertmanager",
Type: "prometheus-alertmanager",
Name: "Alertmanager",
Description: "Sends notifications to Alertmanager",
Heading: "Alertmanager Settings",
@@ -651,6 +651,19 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin {
PropertyName: "url",
Required: true,
},
{
Label: "Basic Auth User",
Element: alerting.ElementTypeInput,
InputType: alerting.InputTypeText,
PropertyName: "basicAuthUser",
},
{
Label: "Basic Auth Password",
Element: alerting.ElementTypeInput,
InputType: alerting.InputTypePassword,
PropertyName: "basicAuthPassword",
Secure: true,
},
},
},
{