forked from kubegems/appstore-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alerts.yaml
41 lines (41 loc) · 1.65 KB
/
alerts.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
# used for generate prometheusrule and alertmanagerconfig
- name: mysql-down
alertType: monitor
expr: mysql_up{service="__fullname__",namespace="__namespace__"} == 0
message: MySQL [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}] down
for: 0m
alertLevels:
- severity: critical
receivers:
- alertChannelID: 1
interval: 10m
- name: mysql-too-many-connections
alertType: monitor
expr: max_over_time(mysql_global_status_threads_connected{service="__fullname__",namespace="__namespace__"}[1m]) / mysql_global_variables_max_connections{service="__fullname__",namespace="__namespace__"} * 100 > 80
message: MySQL [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}] too many connections > 80%
for: 2m
alertLevels:
- severity: error
receivers:
- alertChannelID: 1
interval: 10m
- name: mysql-slow-queries
alertType: monitor
expr: increase(mysql_global_status_slow_queries{service="__fullname__",namespace="__namespace__"}[1m]) > 0
message: MySQL [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}] slow queries
for: 2m
alertLevels:
- severity: error
receivers:
- alertChannelID: 1
interval: 10m
- name: mysql-restarted
alertType: monitor
expr: mysql_global_status_uptime{service="__fullname__",namespace="__namespace__"} < 60
message: MySQL [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}] restarted
for: 0m
alertLevels:
- severity: error
receivers:
- alertChannelID: 1
interval: 10m