Alerting: Add file provisioning for mute timings (#52936)

This commit is contained in:
Jean-Philippe Quéméner
2022-08-01 20:19:33 +02:00
committed by GitHub
parent 7b249d19b2
commit 3d39594d75
9 changed files with 226 additions and 9 deletions

View File

@@ -274,6 +274,7 @@ func (ps *ProvisioningServiceImpl) ProvisionAlerting(ctx context.Context) error
st, ps.SQLStore, ps.log)
notificationPolicyService := provisioning.NewNotificationPolicyService(&st,
st, ps.SQLStore, ps.Cfg.UnifiedAlerting, ps.log)
mutetimingsService := provisioning.NewMuteTimingService(&st, st, &st, ps.log)
cfg := prov_alerting.ProvisionerConfig{
Path: alertingPath,
RuleService: *ruleService,
@@ -281,6 +282,7 @@ func (ps *ProvisioningServiceImpl) ProvisionAlerting(ctx context.Context) error
DashboardProvService: ps.dashboardProvisioningService,
ContactPointService: *contactPointService,
NotificiationPolicyService: *notificationPolicyService,
MuteTimingService: *mutetimingsService,
}
return ps.provisionAlerting(ctx, cfg)
}