This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

The health endpoint provides detailed information about the health of the application.spring-doc.cn

Retrieving the Health of the Application

To retrieve the health of the application, make a GET request to /actuator/health, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/health' -i -X GET \
    -H 'Accept: application/json'

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 821

{
  "status" : "UP",
  "components" : {
    "broker" : {
      "status" : "UP",
      "components" : {
        "us1" : {
          "status" : "UP",
          "details" : {
            "version" : "1.0.2"
          }
        },
        "us2" : {
          "status" : "UP",
          "details" : {
            "version" : "1.0.4"
          }
        }
      }
    },
    "db" : {
      "status" : "UP",
      "details" : {
        "database" : "H2",
        "validationQuery" : "isValid()"
      }
    },
    "diskSpace" : {
      "status" : "UP",
      "details" : {
        "total" : 77851254784,
        "free" : 36707975168,
        "threshold" : 10485760,
        "path" : "/home/runner/work/spring-boot/spring-boot/spring-boot-project/spring-boot-actuator-autoconfigure/.",
        "exists" : true
      }
    }
  }
}

Response Structure

The response contains details of the health of the application. The following table describes the structure of the response:spring-doc.cn

Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Overall status of the application.spring-doc.cn

componentsspring-doc.cn

Objectspring-doc.cn

The components that make up the health.spring-doc.cn

components.*.statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the application.spring-doc.cn

components.*.componentsspring-doc.cn

Objectspring-doc.cn

The nested components that make up the health.spring-doc.cn

components.*.detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application. Presence is controlled by management.endpoint.health.show-details.spring-doc.cn

The response fields above are for the V3 API. If you need to return V2 JSON you should use an accept header or application/vnd.spring-boot.actuator.v2+json
Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Overall status of the application.spring-doc.cn

componentsspring-doc.cn

Objectspring-doc.cn

The components that make up the health.spring-doc.cn

components.*.statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the application.spring-doc.cn

components.*.componentsspring-doc.cn

Objectspring-doc.cn

The nested components that make up the health.spring-doc.cn

components.*.detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application. Presence is controlled by management.endpoint.health.show-details.spring-doc.cn

The response fields above are for the V3 API. If you need to return V2 JSON you should use an accept header or application/vnd.spring-boot.actuator.v2+json

Retrieving the Health of a Component

To retrieve the health of a particular component of the application’s health, make a GET request to /actuator/health/{component}, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/health/db' -i -X GET \
    -H 'Accept: application/json'

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 101

{
  "status" : "UP",
  "details" : {
    "database" : "H2",
    "validationQuery" : "isValid()"
  }
}

Response Structure

The response contains details of the health of a particular component of the application’s health. The following table describes the structure of the response:spring-doc.cn

Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the applicationspring-doc.cn

detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application.spring-doc.cn

Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the applicationspring-doc.cn

detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application.spring-doc.cn

Retrieving the Health of a Nested Component

If a particular component contains other nested components (as the broker indicator in the example above), the health of such a nested component can be retrieved by issuing a GET request to /actuator/health/{component}/{subcomponent}, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/health/broker/us1' -i -X GET \
    -H 'Accept: application/json'

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 66

{
  "status" : "UP",
  "details" : {
    "version" : "1.0.2"
  }
}

Components of an application’s health may be nested arbitrarily deep depending on the application’s health indicators and how they have been grouped. The health endpoint supports any number of /{component} identifiers in the URL to allow the health of a component at any depth to be retrieved.spring-doc.cn

Response Structure

The response contains details of the health of an instance of a particular component of the application. The following table describes the structure of the response:spring-doc.cn

Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the applicationspring-doc.cn

detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application.spring-doc.cn

Path Type Description

statusspring-doc.cn

Stringspring-doc.cn

Status of a specific part of the applicationspring-doc.cn

detailsspring-doc.cn

Objectspring-doc.cn

Details of the health of a specific part of the application.spring-doc.cn