forked from kubegems/appstore-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalerts.yaml
42 lines (42 loc) · 1.89 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
42
# used for generate prometheusrule and alertmanagerconfig
- name: mongodb-down
alertType: monitor
expr: mongodb_up{service="__fullname__",namespace="__namespace__"} == 0
message: MongoDB [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}] down
for: 0m
alertLevels:
- severity: critical
receivers:
- alertChannelID: 1
interval: 10m
- name: mongodb-too-many-connections
alertType: monitor
expr: avg by(instance) (rate(mongodb_connections{state="current",service="__fullname__",namespace="__namespace__"}[1m])) / avg by(instance) (sum (mongodb_connections{service="__fullname__",namespace="__namespace__"})) * 100 > 80
message: MongoDB too many connections [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}]
for: 5m
alertLevels:
- severity: error
receivers:
- alertChannelID: 1
interval: 10m
- name: mongodb-low-avalible-connections
alertType: monitor
expr: mongodb_connections{state="available",service="__fullname__",namespace="__namespace__"} < 100
message: MongoDB few available connections [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}]
for: 5m
alertLevels:
- severity: critical
receivers:
- alertChannelID: 1
interval: 10m
- name: mongodb-too-many-memories
alertType: monitor
expr: mongodb_mongod_wiredtiger_cache_bytes{type="total",service="__fullname__",namespace="__namespace__"} / on(pod,namespace,instance,job,service) mongodb_mongod_wiredtiger_cache_max_bytes{service="__fullname__",namespace="__namespace__"} * 100 > 80
message: MongoDB too many memories [namespace {{ $labels.namespace }}] [service {{ $labels.service }}] [instance {{ $labels.instance }}]
for: 5m
alertLevels:
- severity: error
inhibitLabels: [instance]
receivers:
- alertChannelID: 1
interval: 10m