feat(platform): report redis online key health

This commit is contained in:
lingniu
2026-07-04 08:44:26 +08:00
parent d671184c09
commit 1f777c4040
5 changed files with 385 additions and 5 deletions

View File

@@ -33,7 +33,12 @@ func NewServer(cfg config.Config) http.Handler {
log.Printf("production tdengine store enabled")
}
}
store = platform.NewProductionStore(db, tdengine, cfg.TDengineDatabase)
productionStore := platform.NewProductionStore(db, tdengine, cfg.TDengineDatabase)
if cfg.RedisAddr != "" {
productionStore.WithRedisOnlineKeyCounter(platform.NewRedisOnlineKeyCounter(cfg.RedisAddr, cfg.RedisUsername, cfg.RedisPassword, cfg.RedisDB))
log.Printf("production redis health probe enabled")
}
store = productionStore
log.Printf("production mysql store enabled")
}
}