Skip to content

Comments

[BE] 모니터링 서버 구축 및 외부 지표 연동#283

Merged
jho7535 merged 8 commits intodevelopfrom
feature/#279-be-setup-monitoring
Feb 18, 2026
Merged

[BE] 모니터링 서버 구축 및 외부 지표 연동#283
jho7535 merged 8 commits intodevelopfrom
feature/#279-be-setup-monitoring

Conversation

@jho7535
Copy link
Collaborator

@jho7535 jho7535 commented Feb 16, 2026

#️⃣ 변경 사항

배포 환경의 안정성 및 모니터링 강화를 위해 Docker Compose 설정을 업데이트하고, Prometheus 및 Grafana를 활용한 모니터링 시스템을 구축하였습니다. 또한, 환경 변수 관리 방식을 개선하여 유연한 인프라 구성을 지원합니다.

#️⃣ 작업 상세 내용

  • Docker Compose 서비스 확장 및 최적화: Prometheus와 Grafana 서비스를 추가하여 컨테이너 기반의 통합 모니터링 환경을 구성하고, 서비스 포트 번호를 조정하였습니다.
  • 환경 변수 관리 방식 개선: 기존 코드 내 설정되어 있던 환경 변수를 Docker Compose를 통한 주입 방식으로 변경하여 보안성과 유연성을 향상시켰습니다. (DB 호스트 등)
  • Spring Boot Actuator 설정 추가: 배포 환경에서 애플리케이션의 상태 정보 및 메트릭을 노출하기 위한 Actuator 설정을 활성화하였습니다.
  • Prometheus 메트릭 수집 설정: 애플리케이션의 메트릭을 수집할 수 있도록 Prometheus의 Scraping 설정을 추가하였습니다.
  • Grafana 시각화 환경 구축: 수집된 메트릭 데이터를 시각화하기 위해 Grafana 서비스 접근 및 관련 설정을 완료하였습니다.

#️⃣ 관련 이슈

📸 스크린샷 (선택)

변경 전

변경 후

📎 참고할만한 자료 (선택)

- Grafana 서비스에 대한 Nginx 설정 파일을 추가하여 Grafana에 접근 가능하게 함.
- `/grafana/` 경로에 대한 프록시 설정을 구성하여 Grafana 서비스에 연결.
- 세션 유지, HTTP 버전 설정, 리다이렉트 비활성화 등 Grafana 성능 향상을 위한 설정 추가.
- checkmate-backend, postgres, redis 스크랩 설정 추가
- 메트릭 경로 및 타겟 설정
- 글로벌 설정 간트 인터벌 5초로 설정
- prometheus, grafana 서비스를 추가하여 모니터링 환경 구성
- checkmate-net 네트워크를 생성하여 서비스 간 통신 지원
- prometheus와 grafana에 대한 설정 파일 경로 및 포트 매핑 정보 추가
# Conflicts:
#	backend/src/main/resources/application-prod.yml
@jho7535 jho7535 requested review from 22DT and Copilot February 16, 2026 09:50
@jho7535 jho7535 added ✨ feat 새로운 기능이나 서비스 로직을 추가합니다. 📦 build 외부 라이브러리 및 패키지를 추가하거나 업데이트합니다. labels Feb 16, 2026
@jho7535 jho7535 self-assigned this Feb 16, 2026
@jho7535 jho7535 marked this pull request as ready for review February 16, 2026 09:52
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

모니터링 시스템 구축을 위한 Prometheus, Grafana 연동 및 Spring Boot Actuator 설정 추가가 확인되었습니다. 코드 리뷰 결과, 운영 환경의 보안 및 안정성 강화를 위해 몇 가지 개선점을 제안합니다. 주요 내용으로는 Actuator health 엔드포인트의 상세 정보 노출 수준 조정, Grafana 대시보드 접근 제어 설정, 그리고 Prometheus의 메트릭 수집 주기 최적화에 대한 권고가 포함되어 있습니다.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

운영 환경에 모니터링 스택(Prometheus/Grafana)을 추가하고, 백엔드(Spring Actuator) 및 외부 지표(Postgres/Redis exporter 등) 수집 구성을 연동하기 위한 PR입니다.

Changes:

  • Prometheus 스크레이프 설정 및 Docker Compose에 Prometheus/Grafana 서비스 추가
  • Nginx에 /grafana/ 리버스 프록시 라우팅 추가
  • 백엔드 application-prod.yml에 Actuator(Prometheus/metrics/health) 노출 및 관리 포트 분리 설정 추가

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
prometheus/prometheus.yml 백엔드/외부(Postgres/Redis) 메트릭 스크레이프 타깃 구성 추가
nginx/default.conf Grafana를 서브패스(/grafana/)로 프록시하는 Nginx location 추가
docker-compose.yml Prometheus/Grafana 서비스 및 공용 네트워크/볼륨 구성 추가
backend/src/main/resources/application-prod.yml Actuator 관리 포트(8081) 및 Prometheus 엔드포인트 노출 설정 추가
.github/workflows/be-cd.yml 배포 시 .envDB_HOST 주입 추가

Copy link
Collaborator

@22DT 22DT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@jho7535 jho7535 merged commit 96e8d48 into develop Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 build 외부 라이브러리 및 패키지를 추가하거나 업데이트합니다. ✨ feat 새로운 기능이나 서비스 로직을 추가합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BE] Prometheus & Grafana 모니터링 서버 구축 및 외부 지표 연동

2 participants