add /healthz endpoint (#27536)

kuberentes (and Im sure other orchastrators does as well) support two
kind of checks. readiness checks and liveness checks. Grafanas current
`/api/health` endpoint requires database access which might not
always be required for the instance to be considered active.

(cherry picked from commit 6dc73a6712)
This commit is contained in:
Carl Bergquist
2020-10-08 12:00:32 +03:00
committed by Sofia Papagiannaki
parent efe4941ee3
commit 1e1535552f
2 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -437,7 +437,8 @@ func (hs *HTTPServer) registerRoutes() {
r.Delete("/api/snapshots/:key", reqEditorRole, Wrap(DeleteDashboardSnapshot))
// Health check
r.Get("/api/health", hs.healthHandler)
r.Get("/api/health", hs.apiHealthHandler)
r.Get("/healthz", hs.healthzHandler)
r.Get("/*", reqSignedIn, hs.Index)
}