Alerting: Expose info about notification delivery errors in a new /receivers endpoint (#55429)
* (WIP) switch to fork AM, first implementation of the API, generate spec * get receivers avoiding race conditions * use latest version of our forked AM, tests * make linter happy, delete TODO comment * update number of expected paths to += 2 * delete unused endpoint code, code review comments, tests * Update pkg/services/ngalert/notifier/alertmanager.go Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com> * remove call to fmt.Println * clear naming for fields * shorter variable names in GetReceivers Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
This commit is contained in:
co-authored by
Matthew Jacobson
parent
1e16dd5b7c
commit
09f8e026a1
@@ -142,6 +142,13 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/config/api/v1/receivers alertmanager RouteGetGrafanaReceivers
|
||||
//
|
||||
// Get a list of all receivers.
|
||||
//
|
||||
// Responses:
|
||||
// 200: receivers
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/config/api/v1/receivers/test alertmanager RoutePostTestGrafanaReceivers
|
||||
//
|
||||
// Test Grafana managed receivers without saving them.
|
||||
@@ -403,6 +410,12 @@ type AlertGroup = amv2.AlertGroup
|
||||
// swagger:model receiver
|
||||
type Receiver = amv2.Receiver
|
||||
|
||||
// swagger:model receivers
|
||||
type Receivers = []amv2.Receiver
|
||||
|
||||
// swagger:model integration
|
||||
type Integration = amv2.Integration
|
||||
|
||||
// swagger:parameters RouteGetAMAlerts RouteGetAMAlertGroups RouteGetGrafanaAMAlerts RouteGetGrafanaAMAlertGroups
|
||||
type AlertsParams struct {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user