정의
- [정의] 애플리케이션의 상태에 대한 종합적인 모니터링 제공
- Spring Boot Actuator는 모든 활성화된 endpoint를 HTTP를 통해 노출되도록 자동 설정
- 기능
- 앱 모니터링
- 매트릭 수집
- 트래픽 이해
- 데이터베이스 상태
Dependency
dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' }
노출 정보 추가
management.endpoints.jmx.exposure.include=*
management.endpoints.web.exposure.include=*
Usage
http://localhost:8080/actuator

- /actuator 이후에 beans, caches, health 등등을 추가하면 해당 정보를 가져옴
- 더 세부적인 내용은 그 아래 추가
- ex) /acutator/metrics 를 보내면 아래와 같이 세부적인 옵션이 나옴
- ex) /actuator/metrics/application.ready.time을 보내서 해당 정보를 가져옴

Endpoint 설정
# /actuator를 /monitor로 변경
management.endpoints.web.base-path=/monitor
https://supawer0728.github.io/2018/05/12/spring-actuator/
(Spring Boot)Spring Boot Actuator 소개
서론웹 개발자로서 웹 애플리케이션을 만들 때 신경써야할 것은 서비스 로직 뿐만이 아니다. 웹 애플리케이션의 사용자는 누구인지(일반인? 외부시스템?), 어떤 경로로 애플리케이션에 요청을
supawer0728.github.io
https://www.baeldung.com/spring-boot-actuators
Spring Boot Actuator | Baeldung
A quick intro to Spring Boot Actuators - using and extending the existing ones, configuration and rolling your own.
www.baeldung.com
46. Monitoring and management over HTTP
If you are developing a Spring MVC application, Spring Boot Actuator will auto-configure all enabled endpoints to be exposed over HTTP. The default convention is to use the id of the endpoint as the URL path. For example, health is exposed as /health. 46.1
docs.spring.io
https://sabarada.tistory.com/23
[Spring Boot] Spring Boot Actuator, Application을 모니터링 하자
안녕하세요! 연휴 잘보내고 계신가요? 저도 오랜만에 고향에 내려와서 연휴를 즐기고 있습니다. 시스템을 운영하다보면 시스템이 사용하고 있는 Thread, memory, Session 등의 요소에 대해서 모니터링
sabarada.tistory.com
'프레임워크 > Spring' 카테고리의 다른 글
[Spring] 스프링 부트 정리 (우아한 스프링 부트 - 백기선) (0) | 2022.06.20 |
---|---|
[Spring] Rest API 서버 만들기 1 - 문서화, 구조, Exception, Security (0) | 2022.06.05 |
[Spring] Spring AOP (Aspect-Oriented Programming) (0) | 2022.04.19 |
[Spring] JpaRepository의 delete (0) | 2022.04.04 |
[Spring] @Transactional과 propagation (0) | 2022.04.04 |