I have a Spring boot (2.1.10.RELEASE) application and I have activated actuator to monitor the health of the application. My question as in the title already explained: Is calling the method health of the HealthEndPoint will give the same result as calling e.g. http://localhost:8080/health? Or does the latter checks more things that I am not aware of?
Asked
Active
Viewed 349 times
1 Answers
3
Yes the status results will be the same but you can customize the details by creating a custom health indicator to perform some specific health check
Customizing actuator health endpoint
@Override
public Health health() {
int errorCode = check(); // perform some specific health check
if (errorCode != 0) {
return Health.down().withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}

UDIT JOSHI
- 1,298
- 12
- 26