mirror of https://github.com/prometheus/prometheus
resolved merge confilc in main.go
parent
f2df712166
commit
b0d4f6ee08
|
@ -239,31 +239,18 @@ func main() {
|
||||||
discoveryManager = discovery.NewManager(ctxDiscovery, log.With(logger, "component", "discovery manager"))
|
discoveryManager = discovery.NewManager(ctxDiscovery, log.With(logger, "component", "discovery manager"))
|
||||||
scrapeManager = retrieval.NewScrapeManager(log.With(logger, "component", "scrape manager"), fanoutStorage)
|
scrapeManager = retrieval.NewScrapeManager(log.With(logger, "component", "scrape manager"), fanoutStorage)
|
||||||
queryEngine = promql.NewEngine(fanoutStorage, &cfg.queryEngine)
|
queryEngine = promql.NewEngine(fanoutStorage, &cfg.queryEngine)
|
||||||
ruleManager = rules.NewManager(&rules.ManagerOptions{Appendable: fanoutStorage,
|
ruleManager := rules.NewManager(&rules.ManagerOptions{
|
||||||
Notifier: notifier,
|
Appendable: fanoutStorage,
|
||||||
QueryEngine: queryEngine,
|
QueryFunc: rules.EngineQueryFunc(queryEngine),
|
||||||
Context: ctxRule,
|
NotifyFunc: sendAlerts(notifier, cfg.web.ExternalURL.String()),
|
||||||
|
Context: ctx,
|
||||||
ExternalURL: cfg.web.ExternalURL,
|
ExternalURL: cfg.web.ExternalURL,
|
||||||
|
Registerer: prometheus.DefaultRegisterer,
|
||||||
Logger: log.With(logger, "component", "rule manager"),
|
Logger: log.With(logger, "component", "rule manager"),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
ctx := context.Background()
|
|
||||||
ruleManager := rules.NewManager(&rules.ManagerOptions{
|
|
||||||
Appendable: fanoutStorage,
|
|
||||||
QueryFunc: rules.EngineQueryFunc(queryEngine),
|
|
||||||
NotifyFunc: sendAlerts(notifier, cfg.web.ExternalURL.String()),
|
|
||||||
Context: ctx,
|
|
||||||
ExternalURL: cfg.web.ExternalURL,
|
|
||||||
Registerer: prometheus.DefaultRegisterer,
|
|
||||||
Logger: log.With(logger, "component", "rule manager"),
|
|
||||||
})
|
|
||||||
|
|
||||||
cfg.web.Context = ctx
|
|
||||||
=======
|
|
||||||
cfg.web.Context = ctxWeb
|
cfg.web.Context = ctxWeb
|
||||||
>>>>>>> 95b1dec3... scrape pool doesn't rely on context as Stop() needs to be blocking to prevent Scrape loops trying to write to a closed TSDB storage.
|
|
||||||
cfg.web.TSDB = localStorage.Get
|
cfg.web.TSDB = localStorage.Get
|
||||||
cfg.web.Storage = fanoutStorage
|
cfg.web.Storage = fanoutStorage
|
||||||
cfg.web.QueryEngine = queryEngine
|
cfg.web.QueryEngine = queryEngine
|
||||||
|
@ -295,7 +282,7 @@ func main() {
|
||||||
|
|
||||||
reloaders := []func(cfg *config.Config) error{
|
reloaders := []func(cfg *config.Config) error{
|
||||||
remoteStorage.ApplyConfig,
|
remoteStorage.ApplyConfig,
|
||||||
targetManager.ApplyConfig,
|
discoveryManager.ApplyConfig,
|
||||||
webHandler.ApplyConfig,
|
webHandler.ApplyConfig,
|
||||||
notifier.ApplyConfig,
|
notifier.ApplyConfig,
|
||||||
func(cfg *config.Config) error {
|
func(cfg *config.Config) error {
|
||||||
|
|
Loading…
Reference in New Issue