I have multiple health check in management.endpoint.health.group (foo, bar)
and I deploy my app within a kubernetes cluster,
What I want is when kube send me liveness request and the state of (foo, bar) is aggregated, at this moment (before replying) I want to run some logic based on this last state.
My Indicators are defined like this
@Component
public class FooHealthIndicator implements HealthIndicator {
@Override
public Health health() {
Health.Builder builder = new Health.Builder();
try {
// some foo specific logic
builder.up();
} catch (Exception exception) {
...
builder.down().withException(exception);
}
return builder.build();
}
the same goes for BarHealthIndicator