public WebEndpointResponse<Health> getHealth(SecurityContext securityContext, ShowDetails showDetails) { return this.responseMapper.map(this.delegate.health(), securityContext, showDetails); }
@ReadOperation public WebEndpointResponse<Health> health(SecurityContext securityContext) { return this.responseMapper.map(this.delegate.health(), securityContext); }
/** * Health method * * @return health */ @ShellMethod(key = "health", value = "Display health endpoint.") @ShellMethodAvailability("healthAvailability") public Health health() { return health.health(); }
@SshdShellCommand(value = "info", description = "Health info for all components") public String healthInfo(String arg) { return JsonUtils.asJson(healthEndpoint.health()); }
@GetMapping("/health") public ResponseEntity<Map> getHealth() { Health health = healthEndpoint.health(); Map body = new HashMap(); body.put("status", health.getStatus().getCode()); body.put("zipkin", health.getDetails().get("zipkin")); return ResponseEntity.status(statusMapper.mapStatus(health.getStatus())).body(body); }
/** * Health method * * @return health */ @ShellMethod(key = "health", value = "Display health endpoint.") @ShellMethodAvailability("healthAvailability") public Object health() { return prettify(health.health()); }
/** * Handle request. * * @return the map */ @ReadOperation public Map<String, Object> handle() { val model = new LinkedHashMap<String, Object>(); val health = this.healthEndpoint.health(); val status = health.getStatus(); if (status.equals(Status.DOWN) || status.equals(Status.OUT_OF_SERVICE)) { model.put("status", HttpStatus.SERVICE_UNAVAILABLE.value()); model.put("description", HttpStatus.SERVICE_UNAVAILABLE.name()); } else { model.put("status", HttpStatus.OK.value()); model.put("description", HttpStatus.OK.name()); } model.put("health", status.getCode()); model.put("host", StringUtils.isBlank(casProperties.getHost().getName()) ? InetAddressUtils.getCasServerHostName() : casProperties.getHost().getName()); model.put("server", casProperties.getServer().getName()); model.put("version", CasVersion.asString()); return model; } }