fix notifications
This commit is contained in:
1 parent
e790c02d59
commit
a0f558b43c
10 files changed
+277
-7
No files matched your search
+8
-1
@@ -282,7 +282,7 @@ func main() {
|
||||
// configured or OTEL_ALERT_DRY_RUN=true.
|
||||
var alertRunner *alerts.Runner
|
||||
if chStore, ok := store.(*storage.ClickHouseStore); ok {
|
||||
alertRunner = alerts.Start(context.Background(), alerts.ConfigFromEnv(), chStore.Conn(), chStore.Database(), topo)
|
||||
alertRunner = alerts.Start(context.Background(), alertConfig(coll), chStore.Conn(), chStore.Database(), topo)
|
||||
}
|
||||
// Update collector with wsServer
|
||||
coll.SetBroadcaster(wsServer)
|
||||
@@ -534,3 +534,10 @@ func spaHandler(root http.FileSystem) http.Handler {
|
||||
fileServer.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
||||
// alertConfig is the env-driven alert config plus muting of ignored issues.
|
||||
func alertConfig(coll *collector.Collector) alerts.Config {
|
||||
cfg := alerts.ConfigFromEnv()
|
||||
cfg.Muted = coll.IsIssueIgnored
|
||||
return cfg
|
||||
}
|
||||
Reference in new issue
Block a user