|
|
@ -60,14 +60,17 @@ func Main() int { |
|
|
|
memStorage = local.NewMemorySeriesStorage(&cfg.storage) |
|
|
|
memStorage = local.NewMemorySeriesStorage(&cfg.storage) |
|
|
|
remoteStorage = remote.New(&cfg.remote) |
|
|
|
remoteStorage = remote.New(&cfg.remote) |
|
|
|
sampleAppender = storage.Fanout{memStorage} |
|
|
|
sampleAppender = storage.Fanout{memStorage} |
|
|
|
notificationHandler = notification.NewNotificationHandler(&cfg.notification) |
|
|
|
|
|
|
|
targetManager = retrieval.NewTargetManager(sampleAppender) |
|
|
|
|
|
|
|
queryEngine = promql.NewEngine(memStorage, &cfg.queryEngine) |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
if remoteStorage != nil { |
|
|
|
if remoteStorage != nil { |
|
|
|
sampleAppender = append(sampleAppender, remoteStorage) |
|
|
|
sampleAppender = append(sampleAppender, remoteStorage) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
|
|
|
|
notificationHandler = notification.NewNotificationHandler(&cfg.notification) |
|
|
|
|
|
|
|
targetManager = retrieval.NewTargetManager(sampleAppender) |
|
|
|
|
|
|
|
queryEngine = promql.NewEngine(memStorage, &cfg.queryEngine) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
ruleManager := rules.NewManager(&rules.ManagerOptions{ |
|
|
|
ruleManager := rules.NewManager(&rules.ManagerOptions{ |
|
|
|
SampleAppender: sampleAppender, |
|
|
|
SampleAppender: sampleAppender, |
|
|
|
NotificationHandler: notificationHandler, |
|
|
|
NotificationHandler: notificationHandler, |
|
|
|