Skip to content

Commit

Permalink
Merge pull request #1358 from andrewheberle/patch-1
Browse files Browse the repository at this point in the history
Add health check endpoint
  • Loading branch information
bastischubert authored Feb 5, 2025
2 parents a16bbb6 + 634343b commit 766f9bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ func main() {
handler(w, r, logger, exporterMetrics)
})
http.HandleFunc("/-/reload", updateConfiguration) // Endpoint to reload configuration.
// Endpoint to respond to health checks
http.HandleFunc("/-/healthy", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("Healthy"))
})

if *metricsPath != "/" && *metricsPath != "" {
landingConfig := web.LandingConfig{
Expand Down

0 comments on commit 766f9bc

Please # to comment.