-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
개발서버 모니터링 세팅 #84
Merged
Merged
개발서버 모니터링 세팅 #84
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sungjindev
approved these changes
Feb 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
많은 기능들이 추가되었군요~ 고생 많으셨습니다!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
⭐️ Issue Number
🚩 Summary
로그백, Spring actuator, prometheus, node-exporter, promtail, grafana, loki 를 이용하여 로그를 수집하고 모니터링 합니다.
🛠️ Technical Concerns
AOP
AOP 를 이용하여 추가로 로그를 생성합니다. AOP 를 이용해 Exception 발생시 warn 수준의 로그를 기록하고, 모든 API 요청에 대해 시간을 측정하여 debug 수준의 로그로 기록합니다.
로그백
로그백을 이용하여 로그를 관리합니다. debug, info, warn, error 로 로그레벨을 구분하여 "파일" 로 저장을 합니다.
Spring actuator
Spring actuator 를 이용하여 Spring Application 에 대한 정보를 수집합니다. 해당 정보를 통해 Heap memory, GC 사용률 정보를 알 수 있습니다. 기본적으로 :8080/actuator/prometheus 로 엔드포인트가 되어있지만, application-dev 의 별도의 설정을 통해 엔드포인트를 변경했습니다.(보안상이유)
node-exporter
node-exporter 를 docker 로 띄워 호스트(EC2, GCP) 에 대한 정보를 수집합니다.
Prometheus
Prometheus 를 통해 spring actuator, node-exporter 에서 수집한 정보를 주기적으로 가져와 grafana 로 전송합니다.
promtail
로그백을 통해 저장해둔 로그파일을 로키 서버로 전송합니다.
loki
loki 서버는 promtail 에서 로그정보를 받고 grafana 로 전송합니다.
grafana
grafana 는 수집된 로그정보를 시각화해서 보여줍니다. 그리고 알람을 설정해 서버가 다운됐을때 디스코드로 알람을 보냅니다.
📋 To Do
close #73