사용자 도구

사이트 도구


springframework:springboot:actuator

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
springframework:springboot:actuator [2018/08/21 13:30]
kwon37xi
springframework:springboot:actuator [2019/03/25 20:19]
kwon37xi
줄 17: 줄 17:
 ===== Health Check ===== ===== Health Check =====
   * [[https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#_writing_custom_healthindicators|Writing CUstom Health Indicators]]   * [[https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#_writing_custom_healthindicators|Writing CUstom Health Indicators]]
 +<code java>
 +import org.springframework.boot.actuate.health.Health;
 +import org.springframework.boot.actuate.health.HealthIndicator;
 +import org.springframework.stereotype.Component;
 +
 +@Component
 +public class MyHealthIndicator implements HealthIndicator {
 +
 + @Override
 + public Health health() {
 + int errorCode = check(); // perform some specific health check
 + if (errorCode != 0) {
 + return Health.down().withDetail("Error Code", errorCode).build();
 + }
 + return Health.up().build();
 + }
 +
 +}
 +</code>
   * [[https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/common-application-properties.html|Common Application Properties]]에서 ''management.health'' 참고.   * [[https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/common-application-properties.html|Common Application Properties]]에서 ''management.health'' 참고.
 +
 +===== 참조 =====
 +  * [[https://www.baeldung.com/spring-boot-actuators|Spring Boot Actuator | Baeldung]]
 +  * [[https://brunch.co.kr/@springboot/99|Spring Boot Actuator Metrics]]
 +  * [[https://console.bluemix.net/docs/java/spring-metrics.html#spring-metrics|Metrics with Spring]]
 +  * [[https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector|Micrometer: Spring Boot 2's new application metrics collector]]
 +
  
springframework/springboot/actuator.txt · 마지막으로 수정됨: 2022/10/27 12:38 저자 kwon37xi