@Override
    protected void doHealthCheck(final Health.Builder builder) {
        val aggregatedStatus = new ArrayList<Status>();
        healthIndicators.forEach(indicator -> {
            val health = indicator.getHealth(true);
            val name = (String) health.getDetails().getOrDefault("name", indicator.getClass().getSimpleName());
            val details = new LinkedHashMap<>(health.getDetails());
            details.putIfAbsent("status", health.getStatus());
            builder.withDetail(name, details);
            aggregatedStatus.add(health.getStatus());
        });
        val isUp = aggregatedStatus.stream().allMatch(s -> s.equals(Status.UP));
        builder.status(isUp ? Status.UP : Status.DOWN);
    }
This is {@link CompositeHealthIndicator}.

@author Misagh Moayyed
@since 6.5.0
core/cas-server-core-monitor/src/main/java/org/apereo/cas/monitor/CompositeHealthIndicator.java