diff --git a/services/activitylog/pkg/server/debug/server.go b/services/activitylog/pkg/server/debug/server.go index dab0ed9a9f7..09218a407bd 100644 --- a/services/activitylog/pkg/server/debug/server.go +++ b/services/activitylog/pkg/server/debug/server.go @@ -12,9 +12,16 @@ import ( func Server(opts ...Option) (*http.Server, error) { options := newOptions(opts...) - checkHandler := handlers.NewCheckHandler( + healthHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). - WithLogger(options.Logger)) + WithLogger(options.Logger), + ) + + readyHandler := handlers.NewCheckHandler( + handlers.NewCheckHandlerConfiguration(). + WithLogger(options.Logger). + WithCheck("nats reachability", handlers.NewNatsCheck(options.Config.Events.Cluster)), + ) return debug.NewService( debug.Logger(options.Logger), @@ -24,7 +31,7 @@ func Server(opts ...Option) (*http.Server, error) { debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), debug.Zpages(options.Config.Debug.Zpages), - debug.Health(checkHandler), - debug.Ready(checkHandler), + debug.Health(healthHandler), + debug.Ready(readyHandler), ), nil } diff --git a/services/antivirus/pkg/server/debug/server.go b/services/antivirus/pkg/server/debug/server.go index 7b4ec3c96bb..521434f0c2b 100644 --- a/services/antivirus/pkg/server/debug/server.go +++ b/services/antivirus/pkg/server/debug/server.go @@ -14,9 +14,15 @@ import ( func Server(opts ...Option) (*http.Server, error) { options := newOptions(opts...) - checkHandler := handlers.NewCheckHandler( + healthHandler := handlers.NewCheckHandler( + handlers.NewCheckHandlerConfiguration(). + WithLogger(options.Logger), + ) + + readyHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). WithLogger(options.Logger). + WithCheck("nats reachability", handlers.NewNatsCheck(options.Config.Events.Cluster)). WithCheck("antivirus reachability", func(ctx context.Context) error { cfg := options.Config switch cfg.Scanner.Type { @@ -39,7 +45,7 @@ func Server(opts ...Option) (*http.Server, error) { debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), debug.Zpages(options.Config.Debug.Zpages), - debug.Health(checkHandler), - debug.Ready(checkHandler), + debug.Health(healthHandler), + debug.Ready(readyHandler), ), nil }