Skip to content

Commit

Permalink
Add health endpoint
Browse files Browse the repository at this point in the history
The root endpoint exposes too much data. So it cannot be used as public
health check endpoint.

Signed-off-by: Mitja Adebahr <[email protected]>
  • Loading branch information
adebasi committed Mar 10, 2021
1 parent b57ed98 commit 70bce1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ func run() int {
}
})
http.Handle(path.Join(*routePrefix, "/metrics"), promhttp.Handler())
http.HandleFunc(path.Join(*routePrefix, "/-/healthy"), func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("Healthy"))
})
http.HandleFunc(path.Join(*routePrefix, "/probe"), func(w http.ResponseWriter, r *http.Request) {
sc.Lock()
conf := sc.C
Expand Down

0 comments on commit 70bce1a

Please sign in to comment.