-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-slo-spec.yaml
60 lines (59 loc) · 2.43 KB
/
example-slo-spec.yaml
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
apiVersion: sloth.slok.dev/v1
kind: PrometheusServiceLevel
metadata:
name: example
namespace: monitoring
labels:
release: "prometheus-stack"
spec:
service: "example"
labels:
owner: "platform"
slos:
# Metric sample:
# http_request_duration_seconds_count{container="app", endpoint="metrics", instance="10.49.61.69:9080", job="autopilot-backend-workspace-service", method="GET", namespace="autopilot", pod="autopilot-backend-workspace-rollout-d976d4977-fxwsc", route="/v1/workspaces/:workspaceId", service="autopilot-backend-workspace-service", status_code="200"}
- name: http-error-rate
objective: 99.99
description: "99.99% of the requests should be successful"
sli:
plugin:
id: lokalise/http-error-rate
options:
metricName: http_request_duration_seconds_count
serviceLabelName: service
serviceLabelValue: autopilot-backend-workspace-service
errorLabelName: status_code
errorLabelValue: (5..|429)
additionalLabels: route=~"/v1/workspaces/.*"
minimumRequestsPerSecond: "10"
alerting:
name: HighErrorRate
pageAlert:
annotations:
name: "High error rate in '{{ $labels.sloth_service }}'"
runbookurl: todo
ticketAlert:
disable: true
# Metric sample:
# http_request_duration_seconds_bucket{container="app", endpoint="metrics", instance="10.49.63.203:9080", job="autopilot-backend-import-service", le="5", method="POST", namespace="autopilot", pod="autopilot-backend-import-rollout-68d6f9bd9-xsfg7", route="/v1/projects/:projectId/actions/upload-content-item-collection", service="autopilot-backend-import-service", status_code="202"}
- name: http-latency
objective: 99.99
description: "99.99% of the requests should be below 500ms"
sli:
plugin:
id: lokalise/http-latency
options:
metricName: http_request_duration_seconds_bucket
serviceLabelName: service
serviceLabelValue: autopilot-backend-import-service
upperLimitBucket: "5"
additionalLabels: route=~"/v1/projects/.*"
minimumRequestsPerSecond: "10"
alerting:
name: HighLatency
pageAlert:
annotations:
name: "High latency in '{{ $labels.sloth_service }}'"
runbookurl: todo
ticketAlert:
disable: true