-
Notifications
You must be signed in to change notification settings - Fork 19
/
slo_example.yml
61 lines (52 loc) · 1.65 KB
/
slo_example.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
slos:
- name: myteam-a.service-a
objectives:
availability: 99
latency:
- le: 5.0 # 95% < 5s
target: 95
- le: 10.0 # 97% < 10s
target: 97
labels:
slack_channel: '_team_a'
platform: myplatform
annotations:
message: Service A Error Budget consumption
link: https://grafana.myservice.com/URL
trafficRateRecord:
expr: |
sum (rate(http_requests_total{job="service-a"}[$window]))
errorRateRecord:
alertMethod: multi-window
expr: |
sum (rate(http_requests_total{job="service-a", status="5xx"}[$window])) /
sum (rate(http_requests_total{job="service-a"}[$window]))
latencyRecord:
alertMethod: multi-window
expr: |
sum (rate(http_request_duration_seconds_bucket{job="service-a", le="$le"}[$window])) /
sum (rate(http_requests_total{job="service-a"}[$window]))
- name: myteam-b.service-b
objectives:
availability: 99.9
latency:
- le: 0.05 # 90% < 50ms
target: 90
- le: 0.10 # 95% < 100ms
target: 97
labels:
slack_channel: '_team_b'
platform: myplatform
annotations:
message: Service B Error Budget consumption
link:
errorRateRecord:
alertMethod: multi-window
expr: |
sum (rate(http_requests_total{job="service-b", status="5xx"}[$window])) /
sum (rate(http_requests_total{job="service-b"}[$window]))
latencyRecord:
alertMethod: multi-window
expr: |
sum (rate(http_request_duration_seconds_bucket{job="service-b", le="$le"}[$window])) /
sum (rate(http_requests_total{job="service-b"}[$window]))