From 9c5712ab4276d8e44a12caf75082a9ea50ebb3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A4ring?= Date: Mon, 14 Oct 2024 07:41:32 +0200 Subject: [PATCH] feat: healthcheck for aws ALB --- plugins/receivers/github/github.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/receivers/github/github.go b/plugins/receivers/github/github.go index c33dbb5..c51101b 100644 --- a/plugins/receivers/github/github.go +++ b/plugins/receivers/github/github.go @@ -174,6 +174,10 @@ func Run( } server := &http.Server{Addr: ":" + ctxPlugin.Port} + http.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Write([]byte("ok")) + }) http.HandleFunc("/jobs/v1/receiver", func(w http.ResponseWriter, r *http.Request) { databaseContainer, err := database.GetDatabaseFromContext(pluginCtx) if err != nil {