Alerting: Allow querying of Alerts from notifications (#32614)

* Alerting: Allow querying of Alerts from notifications

* Wire everything up

* Remove unused functions

* Remove duplicate line
This commit is contained in:
gotjosh
2021-04-08 07:27:59 -04:00
committed by GitHub
parent 2f3ef69b30
commit fe67680c42
11 changed files with 425 additions and 226 deletions
+8 -1
View File
@@ -30,11 +30,18 @@ import (
var timeNow = time.Now
type Alertmanager interface {
// Configuration
ApplyConfig(config *apimodels.PostableUserConfig) error
// Silences
CreateSilence(ps *apimodels.PostableSilence) (string, error)
DeleteSilence(silenceID string) error
GetSilence(silenceID string) (apimodels.GettableSilence, error)
ListSilences(filters []string) (apimodels.GettableSilences, error)
ListSilences(filter []string) (apimodels.GettableSilences, error)
// Alerts
GetAlerts(active, silenced, inhibited bool, filter []string, receiver string) (apimodels.GettableAlerts, error)
GetAlertGroups(active, silenced, inhibited bool, filter []string, receiver string) (apimodels.AlertGroups, error)
}
// API handlers.