Part 5: 알림 및 AIOps

난이도: 고급 (Advanced) 예상 소요 시간: 60분 마지막 업데이트: 2026년 2월 23일

학습 목표

  • AlertManager PrometheusRule을 통한 이상 감지

  • Grafana OnCall 인시던트 관리 구성

  • CloudWatch Investigations AI 분석 활용

  • AIOps Agent (Lambda + Bedrock Claude) 구현

아키텍처 개요

AIOps Architecture
spinner

Step 5.1: AlertManager PrometheusRule 구성

알림 규칙 목록

알림 이름
조건
Severity
For

HighErrorRate

5xx > 5%

critical

2m

HighLatency

p99 > 2s

warning

5m

PodCrashLoopBackOff

restarts > 5

critical

5m

SQSQueueBacklog

messages > 1000

warning

10m

NodeNotReady

node not ready

critical

5m

Step 5.1.1: PrometheusRule 생성


Step 5.2: CloudWatch Alarms 구성

Step 5.2.1: Aurora 알람

Step 5.2.2: SQS 알람


Step 5.3: Grafana OnCall 구성

Step 5.3.1: OnCall Integration 설정

Step 5.3.2: Escalation Chain

Step 5.3.3: OnCall Terraform 구성


Step 5.4: SNS 토픽 + 이메일 구독


Step 5.5: CloudWatch Investigations

조사 프로세스

spinner

Step 5.5.1: CloudWatch Investigations 활성화

Step 5.5.2: Investigation 시작 (수동)

CloudWatch Console에서:

  1. CloudWatch > Investigations 이동

  2. Start investigation 클릭

  3. 알람 또는 시간 범위 선택

  4. 관련 리소스 (EKS, RDS, SQS) 선택

  5. Investigate 클릭

Step 5.5.3: Investigation 결과 분석

분석 항목
설명

Timeline

이벤트 발생 타임라인

Key Findings

AI가 식별한 주요 발견 사항

Related Resources

영향받은 리소스 목록

Hypothesis

근본 원인에 대한 AI 가설

Suggestions

권장 조치 사항


Step 5.6: AIOps Agent (Lambda + Bedrock Claude)

AIOps Agent 아키텍처

spinner

Step 5.6.1: Lambda 함수 코드

Step 5.6.2: Lambda IAM Role

Step 5.6.3: Lambda 배포


Step 5.7: 부하 + Fault Injection 테스트

Step 5.7.1: Order Service에 지연 주입

Step 5.7.2: Payment Service 버그 버전 배포

Step 5.7.3: 부하 생성


Step 5.8: AIOps 동작 확인

Step 5.8.1: CloudWatch Investigations 확인

  1. AWS Console > CloudWatch > Investigations 이동

  2. 활성 알람에 대한 Investigation 확인

  3. AI Hypothesis 및 Suggestions 검토

Step 5.8.2: Lambda 로그 확인

Step 5.8.3: SNS 이메일 확인

  • 이메일 수신함에서 AIOps 분석 결과 확인

  • Alert Name, Root Cause Analysis, Recommendations 검토


Step 5.9: (심화) A2A 멀티 에이전트 패턴

멀티 에이전트 아키텍처

spinner
Agent
역할
데이터 소스

Collaborator

조율 및 종합

다른 에이전트 결과

Metric Agent

메트릭 분석

Prometheus, AMP, CloudWatch

Log Agent

로그 분석

Loki, CloudWatch Logs

Trace Agent

트레이스 분석

Tempo, X-Ray

참고: A2A 멀티 에이전트 패턴 구현은 고급 주제로, Amazon Bedrock Agents 또는 LangGraph를 사용하여 구현할 수 있습니다.


검증 (Verification)

알림 흐름 확인

단계
확인 방법
예상 결과

AlertManager

Prometheus UI Alerts

Alert firing

Grafana OnCall

OnCall Dashboard

Incident created

SNS

Email inbox

Alert email received

Lambda

CloudWatch Logs

Analysis executed

AIOps

Email inbox

Analysis report

CW Investigations

Console

Hypothesis generated


정리 (이 Part에서 정리하지 않음)

Fault injection 원복:


참조 문서


다음 단계

알림 및 AIOps 구성이 완료되었습니다. Part 6: 분산 추적 분석로 진행하여 Tempo와 Grafana를 활용한 end-to-end 트레이스 분석을 수행합니다.

마지막 업데이트