1.6 KiB
1.6 KiB
좋아, 주요 설정들을 application.yml 형식으로 실무에 바로 적용할 수 있게 정리해줄게. 설명이 필요한 항목에는 주석도 달아뒀어.
# Actuator 엔드포인트 노출 설정
management:
endpoints:
web:
exposure:
include: health, info, metrics, prometheus, loggers, customstatus
base-path: /actuator # 기본 경로 변경 가능
endpoint:
health:
show-details: always # 상세 정보 노출 (UP, DOWN 원인 포함)
status:
http-mapping:
UP: 200
DOWN: 503
OUT_OF_SERVICE: 503
UNKNOWN: 200
metrics:
enabled: true
prometheus:
enabled: true
loggers:
enabled: true
metrics:
export:
prometheus:
enabled: true # Prometheus 연동 시 필수
server:
port: 8080 # Actuator 별도 포트 지정 가능
# info 엔드포인트에 표시할 정보
info:
app:
name: actuator-demo
version: 1.0.0
author: your-name
# 보안 설정 예시 (기본 사용자)
spring:
security:
user:
name: admin
password: admin123
# Spring Boot Admin 연동 시
spring:
boot:
admin:
client:
url: http://localhost:8081 # Admin 서버 주소
# 커스텀 readiness 체크용 헬스 인디케이터 활용 시
# readinessProbe, livenessProbe와 연동 가능
# (이 설정은 Kubernetes 매니페스트에서 활용됨)
필요하다면 logging, management.trace.http, custom endpoint 관련 설정도 추가할 수 있어. 특정 환경(AWS, Docker, K8s 등)에 맞춰 세부 설정도 정리해줄까?