From 535df48b54b0f1f1c27dffe807de1eb5e2a5ef54 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 15 Oct 2024 13:54:47 +0200 Subject: [PATCH] add http checks to proxy & settings Signed-off-by: Christian Richter --- services/proxy/pkg/server/debug/server.go | 3 ++- services/settings/pkg/server/debug/server.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/proxy/pkg/server/debug/server.go b/services/proxy/pkg/server/debug/server.go index f73685496..216135910 100644 --- a/services/proxy/pkg/server/debug/server.go +++ b/services/proxy/pkg/server/debug/server.go @@ -18,7 +18,8 @@ func Server(opts ...Option) (*http.Server, error) { checkHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). - WithLogger(options.Logger), + WithLogger(options.Logger). + WithCheck("web reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)), ) var configDumpFunc http.HandlerFunc = configDump(options.Config) diff --git a/services/settings/pkg/server/debug/server.go b/services/settings/pkg/server/debug/server.go index e6d7c3b07..99179d7d4 100644 --- a/services/settings/pkg/server/debug/server.go +++ b/services/settings/pkg/server/debug/server.go @@ -14,7 +14,8 @@ func Server(opts ...Option) (*http.Server, error) { checkHandler := handlers.NewCheckHandler( handlers.NewCheckHandlerConfiguration(). - WithLogger(options.Logger), + WithLogger(options.Logger). + WithCheck("web reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)), ) return debug.NewService(