Search in sources :

Example 1 with HealthChecker

use of com.alipay.sofa.healthcheck.core.HealthChecker in project sofa-boot by alipay.

the class HealthCheckTrigger method logPrintCheckers.

private void logPrintCheckers() {
    List<HealthChecker> healthCheckers = HealthCheckManager.getHealthCheckers();
    List<HealthIndicator> healthIndicators = HealthCheckManager.getHealthIndicator();
    StringBuilder hcInfo = new StringBuilder();
    hcInfo.append("\nFound " + healthCheckers.size() + " component health checkers:").append("\n");
    for (HealthChecker healthchecker : healthCheckers) {
        hcInfo.append(healthchecker.getClass()).append("\n");
    }
    hcInfo.append("Found " + healthIndicators.size() + " indicator health checkers:").append("\n");
    for (HealthIndicator healthIndicator : healthIndicators) {
        hcInfo.append(healthIndicator.getClass()).append("\n");
    }
    logger.info(hcInfo.toString());
}
Also used : HealthIndicator(org.springframework.boot.actuate.health.HealthIndicator) HealthChecker(com.alipay.sofa.healthcheck.core.HealthChecker)

Aggregations

HealthChecker (com.alipay.sofa.healthcheck.core.HealthChecker)1 HealthIndicator (org.springframework.boot.actuate.health.HealthIndicator)1