Alerting: Use all notifiers from alerting repository (#60655)

This commit is contained in:
Yuri Tseretyan
2022-12-22 09:27:18 -05:00
committed by GitHub
parent 542cccaecc
commit f990be58cb
28 changed files with 24 additions and 4842 deletions

View File

@@ -17,7 +17,7 @@ import (
"github.com/grafana/alerting/alerting/notifier/channels"
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
ngchannels "github.com/grafana/grafana/pkg/services/ngalert/notifier/channels"
"github.com/grafana/grafana/pkg/services/ngalert/notifier/channels_config"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
@@ -501,7 +501,7 @@ func (m *migration) validateAlertmanagerConfig(orgID int64, config *PostableUser
}
return fallback
}
receiverFactory, exists := ngchannels.Factory(gr.Type)
receiverFactory, exists := channels_config.Factory(gr.Type)
if !exists {
return fmt.Errorf("notifier %s is not supported", gr.Type)
}