storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/docs/metrics/healthcheck/README.md (about)

     1  ## MinIO Healthcheck
     2  
     3  MinIO server exposes three un-authenticated, healthcheck endpoints liveness probe and a cluster probe at `/minio/health/live` and `/minio/health/cluster` respectively.
     4  
     5  ### Liveness probe
     6  
     7  This probe always responds with '200 OK'. When liveness probe fails, Kubernetes like platforms restart the container.
     8  
     9  ```
    10  livenessProbe:
    11    httpGet:
    12      path: /minio/health/live
    13      port: 9000
    14      scheme: HTTP
    15    initialDelaySeconds: 120
    16    periodSeconds: 15
    17    timeoutSeconds: 10
    18    successThreshold: 1
    19    failureThreshold: 3
    20  ```
    21  
    22  ### Cluster probe
    23  #### Cluster-writeable probe
    24  This probe is not useful in almost all cases, this is meant for administrators to see if write quorum is available in any given cluster. The reply is '200 OK' if cluster has write quorum if not it returns '503 Service Unavailable'.
    25  
    26  ```
    27  curl http://minio1:9001/minio/health/cluster
    28  HTTP/1.1 503 Service Unavailable
    29  Accept-Ranges: bytes
    30  Content-Length: 0
    31  Content-Security-Policy: block-all-mixed-content
    32  Server: MinIO/GOGET.GOGET
    33  Vary: Origin
    34  X-Amz-Bucket-Region: us-east-1
    35  X-Minio-Write-Quorum: 3
    36  X-Amz-Request-Id: 16239D6AB80EBECF
    37  X-Xss-Protection: 1; mode=block
    38  Date: Tue, 21 Jul 2020 00:36:14 GMT
    39  ```
    40  
    41  #### Clustr-readable probe
    42  This probe is not useful in almost all cases, this is meant for administrators to see if read quorum is available in any given cluster. The reply is '200 OK' if cluster has read quorum if not it returns '503 Service Unavailable'.
    43  
    44  ```
    45  curl http://minio1:9001/minio/health/cluster/read
    46  HTTP/1.1 503 Service Unavailable
    47  Accept-Ranges: bytes
    48  Content-Length: 0
    49  Content-Security-Policy: block-all-mixed-content
    50  Server: MinIO/GOGET.GOGET
    51  Vary: Origin
    52  X-Amz-Bucket-Region: us-east-1
    53  X-Minio-Write-Quorum: 3
    54  X-Amz-Request-Id: 16239D6AB80EBECF
    55  X-Xss-Protection: 1; mode=block
    56  Date: Tue, 21 Jul 2020 00:36:14 GMT
    57  ```
    58  
    59  #### Checking cluster health for maintenance
    60  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.
    61  
    62  ```
    63  curl http://minio1:9001/minio/health/cluster?maintenance=true
    64  HTTP/1.1 412 Precondition Failed
    65  Accept-Ranges: bytes
    66  Content-Length: 0
    67  Content-Security-Policy: block-all-mixed-content
    68  Server: MinIO/GOGET.GOGET
    69  Vary: Origin
    70  X-Amz-Bucket-Region: us-east-1
    71  X-Amz-Request-Id: 16239D63820C6E76
    72  X-Xss-Protection: 1; mode=block
    73  X-Minio-Write-Quorum: 3
    74  Date: Tue, 21 Jul 2020 00:35:43 GMT
    75  ```