Alerting: Introduces /api/v1/ngalert/alertmanagers to expose discovered and dropped Alertmanager(s) (#37632)
* Alerting: Expose discovered and dropped Alertmanagers Exposes the API for discovered and dropped Alertmanagers. * make admin config poll interval configurable * update after rebase * wordsmith * More wordsmithing * change name of the config * settings package too
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
package definitions
|
||||
|
||||
import v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
|
||||
// swagger:route GET /api/v1/ngalert/alertmanagers configuration RouteGetAlertmanagers
|
||||
//
|
||||
// Get the discovered and dropped Alertmanagers of the user's organization based on the specified configuration.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 200: GettableAlertmanagers
|
||||
|
||||
// swagger:route GET /api/v1/ngalert/admin_config configuration RouteGetNGalertConfig
|
||||
//
|
||||
// Get the NGalert configuration of the user's organization, returns 404 if no configuration is present.
|
||||
@@ -49,3 +61,9 @@ type PostableNGalertConfig struct {
|
||||
type GettableNGalertConfig struct {
|
||||
Alertmanagers []string `json:"alertmanagers"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type GettableAlertmanagers struct {
|
||||
Status string `json:"status"`
|
||||
Data v1.AlertManagersResult `json:"data"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user