-
Notifications
You must be signed in to change notification settings - Fork 0
/
webrules.yml
61 lines (51 loc) · 2.09 KB
/
webrules.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
groups:
- name: python-app-rules
rules:
# Python Application Alerts
- record: job:app_request_latency_seconds:rate1m
expr: rate(app_response_latency_seconds_sum[1m]) / rate(app_response_latency_seconds_count[1m])
- alert: AppLatencyAbove2sec
expr: 2 < job:app_request_latency_seconds:rate1m < 5
for: 2m
labels:
severity: warning
app_type: python
annotations:
summary: 'Python app latency is going high'
description: 'App latency of instance {{ $labels.instance }} of job {{ $labels.job }} is {{ $value }} for more than 5 minutes.'
app_link: 'http://localhost:8000/'
- alert: AppLatencyAbove5sec
expr: job:app_request_latency_seconds:rate1m >= 5
for: 2m
labels:
severity: critical
app_type: python
annotations:
summary: 'Python app latency is over 5 seconds.'
description: 'App latency of instance {{ $labels.instance }} of job {{ $labels.job }} is {{ $value }} for more than 5 minutes.'
app_link: 'http://localhost:8000/'
- name: go-app-rules
rules:
# Go Application Alerts
- record: job:go_app_request_latency_seconds:rate1m
expr: rate(go_app_response_latency_seconds[1m]) / rate(go_app_response_latency_seconds[1m])
- alert: GoAppLatencyAbove2sec
expr: 2 < job:go_app_request_latency_seconds:rate1m < 5
for: 2m
labels:
severity: warning
app_type: go
annotations:
summary: 'Go app latency is unusual'
description: 'App latency of instance {{ $labels.instance }} of job {{ $labels.job }} is {{ $value }} for more than 5 minutes.'
app_link: 'http://localhost:8000/'
- alert: GoAppLatencyAbove5sec
expr: job:go_app_request_latency_seconds:rate1m >= 5
for: 2m
labels:
severity: critical
app_type: go
annotations:
summary: 'Go app latency is over 5 seconds.'
description: 'App latency of instance {{ $labels.instance }} of job {{ $labels.job }} is {{ $value }} for more than 5 minutes.'
app_link: 'http://localhost:8000/'