Files
lehuo/infra/monitoring/alert-rules.yml
T

34 lines
1.3 KiB
YAML
Raw Normal View History

2026-08-12 14:35:12 +08:00
groups:
- name: lehuo-api
rules:
- alert: ApiUnavailable
expr: probe_success{job="lehuo-api"} == 0
for: 2m
labels: { severity: critical }
annotations: { summary: '乐活公益 API 不可用' }
- alert: ApiHighLatency
expr: lehuo_api_p95_milliseconds > 1000
for: 10m
labels: { severity: warning }
annotations: { summary: 'API P95 超过 1 秒' }
- alert: NotificationDeadLetters
expr: lehuo_notification_dead_total > 0
for: 5m
labels: { severity: warning }
annotations: { summary: '微信通知存在死信' }
- alert: BackupMissing
expr: time() - lehuo_backup_last_success_timestamp > 93600
for: 10m
labels: { severity: critical }
annotations: { summary: '超过 26 小时无成功数据库备份' }
2026-10-26 12:11:55 +08:00
- alert: FailedLoginSpike
expr: rate(lehuo_auth_failed_login_total[5m]) > 10
for: 5m
labels: { severity: warning }
annotations: { summary: '检测到异常登录失败 spike (>10次/分钟)' }
- alert: BruteForceAttempt
expr: rate(lehuo_auth_failed_login_total{actor_role="SUPER_ADMIN"}[10m]) > 5
for: 5m
labels: { severity: critical }
annotations: { summary: '管理员账号疑似暴力破解 (>5次失败/分钟)' }