diff options
author | Alex Auvolat <alex@adnab.me> | 2023-06-14 13:53:19 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-06-14 13:53:19 +0200 |
commit | 35c108b85d2b70ad28cd93bfd412607a89b9acf9 (patch) | |
tree | bf64fed2c762a1981c92492e470113574d46d2a8 /doc/drafts | |
parent | 52376d47caf747f5cf93a21e5c15e4e6b8d991ee (diff) | |
download | garage-35c108b85d2b70ad28cd93bfd412607a89b9acf9.tar.gz garage-35c108b85d2b70ad28cd93bfd412607a89b9acf9.zip |
admin api: switch GetClusterHealth to camelcase (fix #381 again)
Diffstat (limited to 'doc/drafts')
-rw-r--r-- | doc/drafts/admin-api.md | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/drafts/admin-api.md b/doc/drafts/admin-api.md index b1a8f402..c80147ef 100644 --- a/doc/drafts/admin-api.md +++ b/doc/drafts/admin-api.md @@ -52,7 +52,7 @@ Returns an HTTP status 200 if the node is ready to answer user's requests, and an HTTP status 503 (Service Unavailable) if there are some partitions for which a quorum of nodes is not available. A simple textual message is also returned in a body with content-type `text/plain`. -See `/v0/health` for an API that also returns JSON output. +See `/v1/health` for an API that also returns JSON output. ### Cluster operations @@ -161,21 +161,21 @@ Example response body: } ``` -#### GetClusterHealth `GET /v0/health` +#### GetClusterHealth `GET /v1/health` Returns the cluster's current health in JSON format, with the following variables: -- `status`: one of `Healthy`, `Degraded` or `Unavailable`: - - Healthy: Garage node is connected to all storage nodes - - Degraded: Garage node is not connected to all storage nodes, but a quorum of write nodes is available for all partitions - - Unavailable: a quorum of write nodes is not available for some partitions -- `known_nodes`: the number of nodes this Garage node has had a TCP connection to since the daemon started -- `connected_nodes`: the nubmer of nodes this Garage node currently has an open connection to -- `storage_nodes`: the number of storage nodes currently registered in the cluster layout -- `storage_nodes_ok`: the number of storage nodes to which a connection is currently open +- `status`: one of `healthy`, `degraded` or `unavailable`: + - healthy: Garage node is connected to all storage nodes + - degraded: Garage node is not connected to all storage nodes, but a quorum of write nodes is available for all partitions + - unavailable: a quorum of write nodes is not available for some partitions +- `knownNodes`: the number of nodes this Garage node has had a TCP connection to since the daemon started +- `connectedNodes`: the nubmer of nodes this Garage node currently has an open connection to +- `storageNodes`: the number of storage nodes currently registered in the cluster layout +- `storageNodesOk`: the number of storage nodes to which a connection is currently open - `partitions`: the total number of partitions of the data (currently always 256) -- `partitions_quorum`: the number of partitions for which a quorum of write nodes is available -- `partitions_all_ok`: the number of partitions for which we are connected to all storage nodes responsible of storing it +- `partitionsQuorum`: the number of partitions for which a quorum of write nodes is available +- `partitionsAllOk`: the number of partitions for which we are connected to all storage nodes responsible of storing it Contrarily to `GET /health`, this endpoint always returns a 200 OK HTTP response code. @@ -183,14 +183,14 @@ Example response body: ```json { - "status": "Degraded", - "known_nodes": 3, - "connected_nodes": 2, - "storage_nodes": 3, - "storage_nodes_ok": 2, - "partitions": 256, - "partitions_quorum": 256, - "partitions_all_ok": 0 + "status": "degraded", + "knownNodes": 3, + "connectedNodes": 3, + "storageNodes": 4, + "storageNodesOk": 3, + "partitions": 256, + "partitionsQuorum": 256, + "partitionsAllOk": 64 } ``` |