Skip to content

Conversation

@dami0806
Copy link
Collaborator

@dami0806 dami0806 commented Jan 9, 2026

#️⃣ 연관된 이슈 번호

관련된 이슈 번호를 작성하고, 자동으로 이슈를 닫으려면 Closes #이슈번호 형식으로 작성해주세요.


⏰ 작업 시간

예상 작업 시간과 실제 작업 시간을 작성해주세요.
두 시간이 다를 경우, 그 이유를 함께 설명해주세요.

  • 예상 작업 시간 : 1h
  • 실제 작업 시간 : 1h

📝 작업 내용

이번 PR(작업)을 통해 수행한 주요 내용을 구체적으로 작성해주세요.


관련된 스크린샷이나 캡처 화면을 첨부해주세요.


🪏 주요 고민과 해결 과정

image

백엔드 node-exp 접근이 안되고 있었다.
방화벽 가능성이 높았고 확인해보니 백엔드 inbound 추가 문제인것을 확인했다.

image

백엔드 서버의 메트릭 정보가 수집이 안되고 있었다.
학습때 누락되었던 부분이였다.

애플리케이션 메트릭을 수집할때: prom-client / Redis Exporter이렇게 사용했었다.

서버별 구성으로

  • 모니터링 서버: Node Exporter만
  • 백엔드 서버: Node Exporter + prom-client ⭐
  • Redis 서버: Node Exporter + Redis Exporter 이렇게 사용되었는데

Node Exporter, Redis Exporter = 독립 실행 파일 → 그냥 실행이 가능했다.
prom-client = npm 라이브러리 → NestJS 통합 코드 필요

그래서 첫번째로 prom-client의 설치 위치를 백엔드 디렉토리에서 누락시켰고, metric에 대한 글로벌 인터셉터 설정이 필요했다.

작업 중 겪은 문제나 고민, 그리고 그에 대한 해결 과정을 정리해주세요.
관련 트러블슈팅 문서가 있다면 링크로 연결해주세요.

위 사항들이 모드 트러블 슈팅을 해결하기 위한 과정이였고, 배포가 되었을때
URL: http://211.188.50.8:9090/targets를 재 확인해야한다.

  • prom-client 설치 (package.json)
  • PrometheusController/Service로 (/metrics 엔드포인트)
  • MetricsInterceptor 생성 (자동 메트릭 수집)
  • 로컬 테스트 성공
image

배포 환경도 수정 완료 했습니다

image

프로메테우스에서 node-exporter를 인식하지 못했던 문제 해결

image

promtail-client cd.yml 파일세팅 추가 -> 정상적인 loki 로그 수집 확인


💬 리뷰 요구사항

리뷰어가 중점적으로 확인해주길 바라는 부분이 있다면 작성해주세요.


📘 참고 자료

참고한 문서, 링크, 또는 외부 리소스를 작성해주세요.

@dami0806 dami0806 self-assigned this Jan 9, 2026
@dami0806 dami0806 added BE 서버, API, 비즈니스 로직 등 서버 사이드 작업 fix 기능 결함이나 예기치 않은 오류를 수정하는 작업 deploy CI/CD 설정 및 배포 관련 작업 labels Jan 9, 2026
Copy link
Collaborator

@KimDongGyun23 KimDongGyun23 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! any 타입은 수정해두면 좋을 것 같아요!

@YunDo-Gi YunDo-Gi self-requested a review January 9, 2026 07:58
Copy link
Collaborator

@YunDo-Gi YunDo-Gi left a comment

Choose a reason for hiding this comment

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

문제가 발생한 원인을 찾고 해결하는 과정이 빠르네요! 고생하셨어요 👏👏

@dami0806
Copy link
Collaborator Author

dami0806 commented Jan 9, 2026

good idea!!

@dami0806 dami0806 merged commit 93417cd into develop Jan 9, 2026
1 check passed
@dami0806 dami0806 deleted the chore/#65-trubleshooting-backend-service branch January 20, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BE 서버, API, 비즈니스 로직 등 서버 사이드 작업 deploy CI/CD 설정 및 배포 관련 작업 fix 기능 결함이나 예기치 않은 오류를 수정하는 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

트러블 슈팅 - 백엔드 prom-client

4 participants