[Chore] 모니터링 알림을 디스코드로 연결하고 대시보드의 빈 패널과 틀린 값을 고친다 - #336
Merged
Merged
Conversation
- ono-alerts.yml 규칙 7개는 평가되고 있었지만 prometheus.prod.yml 에 alerting 설정이 없어서 어디로도 가지 않았다. Alertmanager 를 붙이고 앱 에러 알림과 같은 DISCORD_WEBHOOK_URL 로 보낸다. 웹훅 주소는 설정 파일에 적지 않으려고 컨테이너가 뜰 때 환경변수를 파일로 옮겨 webhook_url_file 로 읽는다 - Redis 와 RabbitMQ 는 떠 있는데 수집을 안 해서 Dependency 대시보드 패널 4개가 항상 비어 있었다. redis-exporter 를 추가하고, RabbitMQ 는 이미지에 내장된 rabbitmq_prometheus 의 detailed 엔드포인트에서 큐별 적체와 컨슈머 수를 가져온다. 합계만 보면 큐 하나의 컨슈머가 죽어도 티가 안 나기 때문이다 - 5xx 비율은 단위가 0~1 인데 경고 기준이 5 라서 에러율이 100% 여도 초록이었고, 평균 응답시간은 기준이 5ms 라 평소에도 빨강이었다. 기준을 고치고 평균 대신 p50 을 둔다 - Server/Process Memory 패널은 JVM 이 내보내지 않는 process_resident_memory_bytes 를 그려서 실제로는 mysql-exporter 메모리를 보여주고 있었다. JVM 메모리로 바꾸고, CPU 도 호스트 전체가 아닌 앱 프로세스 기준으로 바꾼다 - 하루 요청의 96% 가 스캐너라 요청 지표를 /api 로 한정하고, 행동 지표에서는 security_rejected, not_found, unmapped_request 를 뺀다. 트래픽이 적어 5분 창은 너무 튀기 때문에 1시간 창으로 보고 p99 는 뺐다 - 외부 API 성공률은 호출이 없으면 0% 빨강으로 보였다. 호출이 없을 때는 값을 비우고 호출 없음으로 표시한다 - promtail 이 Loki 자기 로그를 수집해서 하루 로그의 97% 를 차지하고 있었다. 수집 대상에서 빼고 Alertmanager 로그를 넣는다 - 배포와 모니터링 재시작 워크플로에 새 컨테이너를 추가하고, restart-monitoring 의 .env.prod 에 빠져 있던 DISCORD_WEBHOOK_URL 을 넣는다 Closes #335
This was referenced Sep 21, 2026
This file contains hidden or 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
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.
✔️ 연관 이슈
📝 작업 내용
DISCORD_WEBHOOK_URL로 보냅니다. 웹훅 주소는 설정 파일에 적지 않고 컨테이너가 뜰 때 환경변수에서 파일로 옮겨 읽습니다.rabbitmq_prometheus의 detailed 엔드포인트에서 큐별 적체와 컨슈머 수를 가져옵니다. 항상 비어 있던 패널 4개가 채워집니다.5(=500%)라 항상 초록/api한정, 1% 주황, 5% 빨강/api한정, 1시간 창, p99 제거👤 사용자 영향
🔌 API 호환성
🗄️ DB migration
🔐 인증/권한
✅ 검증 결과
-check-syntax,docker compose config를 dev, prod 모두 통과했습니다.up= 1,redis_memory_max_bytes= 512MB, 큐를 만든 뒤 큐별 컨슈머와 적체 지표가 나오는 것OnOBackendDownProd가 실제로 firing 되고, 로컬에 띄운 가짜 웹훅으로 디스코드 embed 형식이 도착하는 것🚀 배포 리스크
↩️ 롤백/대응 방법
Restart Monitoring Stack워크플로를 해당 환경으로 돌리면 됩니다.