forked from OpenSLO/slogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ingest-lag-timeslice-budgeting.yaml
51 lines (51 loc) · 1.61 KB
/
ingest-lag-timeslice-budgeting.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
apiVersion: openslo/v1alpha
kind: SLO
metadata:
displayName: CloudCollector Ingest Lag
name: cc-ingest-lag-v2
spec:
service: cloudcollector
description: Track number of seconds a message is delayed in the ingest pipeline
budgetingMethod: Timeslices
objectives:
- displayName: SLI to track ingest job is completed within 5 seconds for cloudcollector
target: 0.95
timeSliceTarget: 0.9 # ratio of good to total msgs, so as to consider that time window healthy, only applicable for Timeslices budgeting
ratioMetrics:
total:
source: sumologic
queryType: Logs
query: |
_sourcecategory=cloudcollector DefaultPerCustomerLagTracker !CustomerLagQueryDisablingStrategy "current lag"
| parse "current lag: Some(*) ms," as lag
| where lag != "*"
| parse "customer: *," as customer_id
| where customer_id matches "*"
| lag / 1000 as lag_seconds
good:
source: sumologic
queryType: Logs
query: lag_seconds <= 20
incremental: true
createView: true
fields:
customerID: "customer_id"
deployment: 'if(isNull(deployment),"dev",deployment)' # using an expression
cluster: 'if(isNull(cluster),"-",cluster)'
labels:
team: collection
tier: 0
alerts:
burnRate:
- shortWindow: '10m'
shortLimit: 14
longWindow: '1h'
longLimit: 14
notifications:
- connectionType: 'Email'
recipients:
timeZone: 'PST'
triggerFor:
- Warning
- ResolvedWarning