-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalert_rules.yml
More file actions
35 lines (32 loc) · 904 Bytes
/
alert_rules.yml
File metadata and controls
35 lines (32 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
groups:
- name: api_alerts
rules:
- alert: HighErrorRate
expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.05
for: 2m
annotations:
summary: "High error rate on {{ $labels.instance }}"
- alert: HighResponseTime
expr: http_request_duration_seconds > 1
for: 5m
annotations:
summary: "API response time too high"
- name: service_health
rules:
- alert: ServiceDown
expr: up == 0
for: 30s
labels:
severity: critical
annotations:
summary: "{{ $labels.job }} is down"
description: "Instance {{ $labels.instance }} has been down for 30 seconds."
- name: test_alerts
rules:
- alert: AlwaysFiring
expr: vector(1)
for: 10s
labels:
severity: critical
annotations:
summary: "Test alert; should always fire"