forked from OpenSLO/slogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drift-calculation.yaml
64 lines (64 loc) · 2.03 KB
/
drift-calculation.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
61
62
63
64
apiVersion: openslo/v1alpha
kind: SLO
metadata:
displayName: Drift Computation Time
name: anomaly-compute-delay
spec:
service: ts-analytics
description: checks anomalies are being calculated and with acceptable delays
budgetingMethod: Occurrences
objectives:
- ratioMetrics:
good:
source: sumologic
queryType: Logs
query: '!isNull(duration) and duration < 4400'
incremental: true
total:
source: sumologic
queryType: Logs
query: '_sourceCategory=tsat-batcher | where msg="DriftGen query completed"'
displayName: delay less than 100 seconds
target: 0.80
createView: true
fields:
region: 'if(isNull(Region),"-",Region)' # using an expression
labels:
team: metrics
tier: 0
alerts:
burnRate:
- shortWindow: '10m'
shortLimit: 14
longWindow: '1h'
longLimit: 14
notifications:
- connectionType: 'Email'
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"
recipients:
timeZone: 'PST'
triggerFor:
- Warning
- ResolvedWarning
- connectionType: 'PagerDuty'
connectionID: '000000000001ABCD' # id of pagerduty connection created in Sumo Logic
triggerFor:
- Warning
- ResolvedWarning
payload_override: |
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
resolution_payload_override: |
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "resolve",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}