Alerting: Fetch all applied alerting configurations (#65728)

* WIP

* skip invalid historic configurations instead of erroring

* add warning log when bad historic config is found

* remove unused custom marshaller for GettableHistoricUserConfig

* add id to historic user config, move limit check to store, fix typo

* swagger spec
This commit is contained in:
Santiago
2023-03-31 17:43:04 -03:00
committed by GitHub
parent 412fc4dcfb
commit aba91d3053
17 changed files with 920 additions and 117 deletions

View File

@@ -28,6 +28,7 @@ type AlertingStore interface {
SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, callback SaveCallback) error
UpdateAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
MarkConfigurationAsApplied(ctx context.Context, cmd *models.MarkConfigurationAsAppliedCmd) error
GetAppliedConfigurations(ctx context.Context, orgID int64, limit int) ([]*models.HistoricAlertConfiguration, error)
}
// DBstore stores the alert definitions and instances in the database.