Recently I update spring-boot-starter-actuator to 2.2.2 and when I consume the /health endpoint i got:
{
"groups": [],
"status": {
"code": "UP",
"description": ""
}
}
instead of:
{
"status": "UP"
}
And i don't have any clue the reason of this. Any idea? Or how I can refomat the output json to the original format? Not overwrite the HealthIndicator, only reformat.
Thanks in advance.
Spring Actuator 2.2 Health Endpoint JSON documentation says:
The
/actuator/healthendpoint has changed the resulting JSON format by renamingdetailstocomponentsfor the first-level elements. This helps to differentiate the actual details returned by aHealthIndicatorfrom the component indicators that make up composite health.As a result of the change, the actuator media type has been bumped from
application/vnd.spring-boot.actuator.v2+jsontoapplication/vnd.spring-boot.actuator.v3+json. If you have tools that need to consume the older format, you can use an HTTP Accept: header with the V2 media type,application/vnd.spring-boot.actuator.v2+json.
In addition if you want to see all documentation related to health and what is groups ? how to custom the health indicator take a look the
Current Health Information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With