2022-02-11 19:51:25 -05:00
# MinIO Healthcheck
2018-03-12 02:16:53 -04:00
2020-10-12 21:56:03 -04:00
MinIO server exposes three un-authenticated, healthcheck endpoints liveness probe and a cluster probe at `/minio/health/live` and `/minio/health/cluster` respectively.
2018-03-12 02:16:53 -04:00
2022-02-11 19:51:25 -05:00
## Liveness probe
2018-03-15 00:25:02 -04:00
2022-10-24 20:44:15 -04:00
This probe always responds with '200 OK'. Only fails if 'etcd' is configured and unreachable. When liveness probe fails, Kubernetes like platforms restart the container.
2018-03-12 02:16:53 -04:00
2020-06-30 14:28:27 -04:00
```
2020-10-12 21:56:03 -04:00
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
scheme: HTTP
initialDelaySeconds: 120
2021-09-03 20:05:41 -04:00
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
```
2022-02-11 19:51:25 -05:00
## Readiness probe
2021-09-03 20:05:41 -04:00
2022-10-24 20:44:15 -04:00
This probe always responds with '200 OK'. Only fails if 'etcd' is configured and unreachable. When readiness probe fails, Kubernetes like platforms turn-off routing to the container.
2021-09-03 20:05:41 -04:00
```
readinessProbe:
httpGet:
path: /minio/health/ready
port: 9000
scheme: HTTP
initialDelaySeconds: 120
2020-10-12 21:56:03 -04:00
periodSeconds: 15
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
2020-06-30 14:28:27 -04:00
```
2018-03-12 02:16:53 -04:00
2022-02-11 19:51:25 -05:00
## Cluster probe
### Cluster-writeable probe
2022-05-12 12:54:07 -04:00
The reply is '200 OK' if cluster has write quorum if not it returns '503 Service Unavailable'.
2020-07-20 21:31:22 -04:00
```
curl http://minio1:9001/minio/health/cluster
HTTP/1.1 503 Service Unavailable
Accept-Ranges: bytes
Content-Length: 0
Content-Security-Policy: block-all-mixed-content
Server: MinIO/GOGET.GOGET
Vary: Origin
X-Amz-Bucket-Region: us-east-1
2020-09-23 12:14:33 -04:00
X-Minio-Write-Quorum: 3
2020-07-20 21:31:22 -04:00
X-Amz-Request-Id: 16239D6AB80EBECF
X-Xss-Protection: 1; mode=block
Date: Tue, 21 Jul 2020 00:36:14 GMT
```
2022-02-11 19:51:25 -05:00
### Cluster-readable probe
2022-05-12 12:54:07 -04:00
The reply is '200 OK' if cluster has read quorum if not it returns '503 Service Unavailable'.
2021-02-09 04:00:44 -05:00
```
curl http://minio1:9001/minio/health/cluster/read
HTTP/1.1 503 Service Unavailable
Accept-Ranges: bytes
Content-Length: 0
Content-Security-Policy: block-all-mixed-content
Server: MinIO/GOGET.GOGET
Vary: Origin
X-Amz-Bucket-Region: us-east-1
X-Minio-Write-Quorum: 3
X-Amz-Request-Id: 16239D6AB80EBECF
X-Xss-Protection: 1; mode=block
Date: Tue, 21 Jul 2020 00:36:14 GMT
```
2022-02-11 19:51:25 -05:00
### Checking cluster health for maintenance
2020-09-18 12:52:37 -04:00
You may query the cluster probe endpoint to check if the node which received the request can be taken down for maintenance, if the server replies back '412 Precondition Failed' this means you will lose HA. '200 OK' means you are okay to proceed.
2020-07-20 21:31:22 -04:00
```
curl http://minio1:9001/minio/health/cluster?maintenance=true
HTTP/1.1 412 Precondition Failed
Accept-Ranges: bytes
Content-Length: 0
Content-Security-Policy: block-all-mixed-content
Server: MinIO/GOGET.GOGET
Vary: Origin
X-Amz-Bucket-Region: us-east-1
X-Amz-Request-Id: 16239D63820C6E76
X-Xss-Protection: 1; mode=block
2020-09-23 12:14:33 -04:00
X-Minio-Write-Quorum: 3
2020-07-20 21:31:22 -04:00
Date: Tue, 21 Jul 2020 00:35:43 GMT
```