Infra2025년 11월 20일2분 읽기

Prometheus AlertManager — 알림 규칙과 라우팅 설정

YS
YoungSam
조회 955

알림 규칙

# alert_rules.yml
groups:
  - name: api-alerts
    rules:
      - alert: HighErrorRate
        expr: rate(http_errors_total[5m]) > 0.1
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "에러율 10% 초과"

AlertManager 라우팅

# alertmanager.yml
route:
  receiver: "default"
  routes:
    - match: { severity: critical }
      receiver: "slack-critical"
    - match: { severity: warning }
      receiver: "email"
receivers:
  - name: "slack-critical"
    slack_configs:
      - channel: "#alerts"
        api_url: "https://hooks.slack.com/..."
PrometheusAlertManagerMonitoring

댓글 0

아직 댓글이 없습니다.