알림 규칙
# 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/..."
댓글 0