X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/060d38d627bd1e51dd2b3c6e7de9af6aa7d7b6f3..c4e6d3c9a8a55460c4ee663e66ea1093c6088d4f:/services/keepstore/handlers.go diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go index f197196c41..2d90aba14e 100644 --- a/services/keepstore/handlers.go +++ b/services/keepstore/handlers.go @@ -29,6 +29,7 @@ import ( "github.com/gorilla/mux" + "git.curoverse.com/arvados.git/sdk/go/health" "git.curoverse.com/arvados.git/sdk/go/httpserver" log "github.com/Sirupsen/logrus" ) @@ -78,6 +79,11 @@ func MakeRESTRouter() *router { // Untrash moves blocks from trash back into store rest.HandleFunc(`/untrash/{hash:[0-9a-f]{32}}`, UntrashHandler).Methods("PUT") + rest.Handle("/_health/{check}", &health.Handler{ + Token: theConfig.ManagementToken, + Prefix: "/_health/", + }).Methods("GET") + // Any request which does not match any of these routes gets // 400 Bad Request. rest.NotFoundHandler = http.HandlerFunc(BadRequestHandler) @@ -285,7 +291,7 @@ func (rtr *router) MountsHandler(resp http.ResponseWriter, req *http.Request) { // PoolStatus struct type PoolStatus struct { - Alloc uint64 `json:"BytesAllocated"` + Alloc uint64 `json:"BytesAllocatedCumulative"` Cap int `json:"BuffersMax"` Len int `json:"BuffersInUse"` }