92 lines
4.2 KiB
YAML
92 lines
4.2 KiB
YAML
groups:
|
|
- name: lab6-operational
|
|
interval: 5s
|
|
rules:
|
|
- alert: Lab6HighHttpErrorRate
|
|
expr: |
|
|
sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[30s]))
|
|
/ clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[30s])), 0.001) > 0.10
|
|
for: 10s
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: More than 10% of business HTTP requests return 5xx
|
|
runbook: See infra/runbooks/incident.md#http-errors
|
|
- alert: Lab6QueueLag
|
|
expr: |
|
|
(messenger_queue_oldest_age_seconds{queue_name="attachments.process"}
|
|
and (time() - timestamp(messenger_queue_oldest_age_seconds{queue_name="attachments.process"}) < 15)) > 10
|
|
for: 10s
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: Oldest queued image job is over 10 seconds old
|
|
runbook: See infra/runbooks/incident.md#queue-lag
|
|
- name: lab6-slo-burn
|
|
interval: 5s
|
|
rules:
|
|
- alert: Lab6ApiBurnShort
|
|
expr: |
|
|
((sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[15s])) or vector(0))
|
|
/ clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[15s])),0.001) > 0.144)
|
|
and
|
|
((sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[30s])) or vector(0))
|
|
/ clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[30s])),0.001) > 0.144)
|
|
for: 10s
|
|
labels:
|
|
severity: page
|
|
slo: api
|
|
window: short
|
|
annotations:
|
|
summary: API error budget burning over 14.4x in both 15s and 30s windows
|
|
runbook: See infra/runbooks/incident.md#http-errors
|
|
- alert: Lab6ApiBurnLong
|
|
expr: |
|
|
((sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[60s])) or vector(0))
|
|
/ clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[60s])),0.001) > 0.06)
|
|
and
|
|
((sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[120s])) or vector(0))
|
|
/ clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[120s])),0.001) > 0.06)
|
|
for: 90s
|
|
labels:
|
|
severity: warning
|
|
slo: api
|
|
window: long
|
|
annotations:
|
|
summary: API error budget burning over 6x in both 60s and 120s windows
|
|
runbook: See infra/runbooks/incident.md#http-errors
|
|
- alert: Lab6ReadyBurnShort
|
|
expr: |
|
|
((sum(rate(messenger_attachments_ready_duration_seconds_count[15s]))
|
|
- sum(rate(messenger_attachments_ready_duration_seconds_bucket{le="5"}[15s])))
|
|
/ clamp_min(sum(rate(messenger_attachments_ready_duration_seconds_count[15s])),0.001) > 0.72)
|
|
and
|
|
((sum(rate(messenger_attachments_ready_duration_seconds_count[30s]))
|
|
- sum(rate(messenger_attachments_ready_duration_seconds_bucket{le="5"}[30s])))
|
|
/ clamp_min(sum(rate(messenger_attachments_ready_duration_seconds_count[30s])),0.001) > 0.72)
|
|
for: 10s
|
|
labels:
|
|
severity: page
|
|
slo: ready
|
|
window: short
|
|
annotations:
|
|
summary: Ready-time error budget burning over 14.4x in both 15s and 30s windows
|
|
runbook: See infra/runbooks/incident.md#queue-lag
|
|
- alert: Lab6ReadyBurnLong
|
|
expr: |
|
|
((sum(rate(messenger_attachments_ready_duration_seconds_count[60s]))
|
|
- sum(rate(messenger_attachments_ready_duration_seconds_bucket{le="5"}[60s])))
|
|
/ clamp_min(sum(rate(messenger_attachments_ready_duration_seconds_count[60s])),0.001) > 0.30)
|
|
and
|
|
((sum(rate(messenger_attachments_ready_duration_seconds_count[120s]))
|
|
- sum(rate(messenger_attachments_ready_duration_seconds_bucket{le="5"}[120s])))
|
|
/ clamp_min(sum(rate(messenger_attachments_ready_duration_seconds_count[120s])),0.001) > 0.30)
|
|
for: 90s
|
|
labels:
|
|
severity: warning
|
|
slo: ready
|
|
window: long
|
|
annotations:
|
|
summary: Ready-time error budget burning over 6x in both 60s and 120s windows
|
|
runbook: See infra/runbooks/incident.md#queue-lag
|