-
Notifications
You must be signed in to change notification settings - Fork 0
/
5-alertmanager.yml
98 lines (95 loc) · 2.07 KB
/
5-alertmanager.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: v1
kind: ConfigMap
metadata:
name: alertmanager-config
data:
config.yml: |-
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'localhost:25'
smtp_from: '[email protected]'
route:
receiver: 'default-receiver'
group_by: ['alertname', 'cluster']
group_wait: 30s
group_interval: 5m
repeat_interval: 3h
routes:
- receiver: pagerduty-receiver
match:
severity: critical
- receiver: email-receiver
match:
severity: major
receivers:
- name: 'pagerduty-receiver'
pagerduty_configs:
- service_key: <some_key>
- name: 'email-receiver'
email_configs:
- to: '[email protected]'
- name: 'default-receiver'
email_configs:
- to: '[email protected]'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertmanager
spec:
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
app: alertmanager
strategy:
rollingUpdate:
maxSurge: 0
template:
metadata:
name: alertmanager
labels:
app: alertmanager
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9093"
spec:
containers:
- name: alertmanager
image: prom/alertmanager:v0.14.0
args:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
volumeMounts:
- name: config
mountPath: /etc/alertmanager
ports:
- name: web
containerPort: 9093
livenessProbe:
httpGet:
path: /-/healthy
port: alertmanager
resources:
limits:
memory: 512Mi
volumes:
- name: config
configMap:
name: alertmanager-config
---
apiVersion: v1
kind: Service
metadata:
labels:
name: alertmanager
name: alertmanager
spec:
type: LoadBalancer
selector:
app: alertmanager
ports:
- name: alertmanager
protocol: TCP
port: 9093
targetPort: web