Spring Boot Actuator's health system can be extended with custom HealthIndicator implementations to report on application-specific dependencies, giving monitoring tools detailed, meaningful signals beyond the generic built-in checks.
A custom PaymentGatewayHealthIndicator pings the third-party payment provider and reports DOWN with a "reason" detail if it's unreachable, so the monitoring dashboard immediately flags the actual root cause instead of a generic failure.
@Component
public class PaymentGatewayHealthIndicator implements HealthIndicator {
@Override
public Health health() {
if (paymentClient.isReachable()) {
return Health.up().build();
}
return Health.down().withDetail("reason", "Payment gateway unreachable").build();
}
}A concise interview answer is
I'd implement custom HealthIndicator beans for the things that actually matter to the app, like database and downstream API connectivity, register them as Spring beans, and set show-details to always so the health endpoint gives operators real diagnostic detail instead of a generic up or down status.
Last updated: 11 November 2026
Next question: How do you make sure a custom starter doesn't interfere with Spring Boot's own auto-configuration?