mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
log provisioning errors (#43041)
This commit is contained in:
parent
f5802878f1
commit
2ef071e728
@ -137,20 +137,32 @@ func (ps *ProvisioningServiceImpl) Run(ctx context.Context) error {
|
||||
|
||||
func (ps *ProvisioningServiceImpl) ProvisionDatasources(ctx context.Context) error {
|
||||
datasourcePath := filepath.Join(ps.Cfg.ProvisioningPath, "datasources")
|
||||
err := ps.provisionDatasources(ctx, datasourcePath)
|
||||
return errutil.Wrap("Datasource provisioning error", err)
|
||||
if err := ps.provisionDatasources(ctx, datasourcePath); err != nil {
|
||||
err = errutil.Wrap("Datasource provisioning error", err)
|
||||
ps.log.Error("Failed to provision data sources", "error", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ps *ProvisioningServiceImpl) ProvisionPlugins(ctx context.Context) error {
|
||||
appPath := filepath.Join(ps.Cfg.ProvisioningPath, "plugins")
|
||||
err := ps.provisionPlugins(ctx, appPath, ps.pluginStore)
|
||||
return errutil.Wrap("app provisioning error", err)
|
||||
if err := ps.provisionPlugins(ctx, appPath, ps.pluginStore); err != nil {
|
||||
err = errutil.Wrap("app provisioning error", err)
|
||||
ps.log.Error("Failed to provision plugins", "error", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ps *ProvisioningServiceImpl) ProvisionNotifications(ctx context.Context) error {
|
||||
alertNotificationsPath := filepath.Join(ps.Cfg.ProvisioningPath, "notifiers")
|
||||
err := ps.provisionNotifiers(ctx, alertNotificationsPath, ps.EncryptionService)
|
||||
return errutil.Wrap("Alert notification provisioning error", err)
|
||||
if err := ps.provisionNotifiers(ctx, alertNotificationsPath, ps.EncryptionService); err != nil {
|
||||
err = errutil.Wrap("Alert notification provisioning error", err)
|
||||
ps.log.Error("Failed to provision alert notifications", "error", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ps *ProvisioningServiceImpl) ProvisionDashboards(ctx context.Context) error {
|
||||
|
Loading…
Reference in New Issue
Block a user