
2가지를 조정해줘야하는데 엔드포인트 활성화, 엔드포인트 노출 이다.
엔드포인트 활성화는 엑츄에이터의 기능을 활성화 할건지 말지
엔드포인트 노출은 html등으로 웹에서 그 기능을 노출시킬건지말지 이다.
활성화는 기본적으로 shutdown빼고 모두 활성화되어있다. (shutdown은 이거 호출하면 실제 서비스가 꺼짐..)
management:
endpoints:
web:
exposure:
include: "*"
management:
endpoint:
shutdown:
enabled: true
endpoints:
web:
exposure:
include: "*"
management:
endpoints:
jmx:
exposure:
include: "health,info"
management:
endpoints:
web:
exposure:
include: "*"
exclude: "env,beans"
엔드포인트 목록
HttpExchangeRepository빈 등록해야함)전체적으로는 공식문서 참고하기
헬스 정보는 단순히 애플리케이션이 요청에 응답을 할 수 있는지 판단하는 것을 넘어서 애플리케이션이 사용하는 데이터베이스가 응답하는지, 디스크 사용량에는 문제가 없는지 같은 다양한 정보들을 포함해서 만들어진다.
http://localhost:8080/actuator/health
{"status": "UP"}
management:
endpoint:
health:
show-details: always
{
`
"status": "UP",
"components": {
"db": {
"status": "UP",
"details": {
"database": "H2",
"validationQuery": "isValid()"
}
},
"diskSpace": {
"status": "UP",
"details": {
"total": 994662584320,
"free": 303418753024,
"threshold": 10485760,
"path": ".../spring-boot/actuator/actuator/.",
"exists": true
}
},
"ping": {
"status": "UP"
}
}
}
management:
endpoint:
health:
show-components: always
{
**
"status": "UP",
"components": {
"db": {
"status": "UP"
},
"diskSpace": {
"status": "UP"
},
"ping": {
"status": "UP"
}
}
}
{
"status": "DOWN",
"components": {
"db": {
"status": "DOWN"
},
"diskSpace": {
"status": "UP"
},
"ping": {
"status": "UP"
.
.
.
하나만 down이 떠도 상태는 down