Skip to content

feat(alerting): DB 및 디스크 이상 자동 incident 경보 추가 #21

Description

@ohhalim

배경

  • MySQL exporter 및 database_observability.mysql locks collector 운영 연결 완료
  • 실제 락 대기 수집: Loki op=query_data_locks 4건
  • Gemini 분석 및 Slack delivery 검증 완료
  • 현재 자동 incident 규칙: 애플리케이션 ERROR, 백엔드 다운, MySQL exporter 다운, 배치 미실행
  • DB 락·데드락·커넥션 대기·느린 쿼리·디스크 공간 부족은 자동 incident 미연결

운영 기준값

  • hikaricp_connections_pending: 0
  • Hikari active/max: 0
  • 최근 15분 deadlock 증가: 0
  • MySQL 연결 사용률: 약 8.6%
  • 루트 파일시스템 가용률: 약 30.8%
  • 최근 15분 slow query 증가: 약 2 — 운영 락 검증용 SLEEP(25) 영향

변경 범위

  • DB 락: Loki query_data_locks 존재 30초 지속
  • 데드락: MySQL deadlock counter 5분 내 1건 이상
  • 커넥션 고갈: Hikari pending 1분 지속
  • 느린 쿼리: MySQL slow query counter 5분 내 1건 이상
  • 디스크 부족: 루트 파일시스템 가용률 15% 미만 5분 지속
  • 전체 규칙에 ai_analyze=true, service/environment/severity/route 지정
  • Grafana provisioning 계약 테스트 보완

검증

  • PromQL·LogQL 운영 데이터 조회
  • YAML 파싱 및 provisioning 단위 테스트
  • Grafana provisioning error 미발생 확인
  • 경보별 query 결과 검증
  • 실제 DB 락 경보 → incident-api → Gemini → Slack 자동 전달 검증

남은 리스크

  • slow query 1건 임계치의 운영 오탐률 관찰 필요
  • deadlock과 디스크 부족은 운영 데이터 파괴 없이 query·규칙 상태 중심 검증
  • 반복 알림은 기존 notification policy repeat_interval=6h 적용

Activity

  1. github-actions commented on Aug 22, 2026

    @github-actions

    브랜치 생성에 실패했습니다. Actions 로그를 확인해주세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions