Compare commits
1 Commits
master
...
alertmanag
Author | SHA1 | Date | |
---|---|---|---|
a11a43c757 |
80
prometheus-operator/alertmanager-config.yml
Normal file
80
prometheus-operator/alertmanager-config.yml
Normal file
@ -0,0 +1,80 @@
|
||||
apiVersion: monitoring.coreos.com/v1alpha1
|
||||
kind: AlertmanagerConfig
|
||||
metadata:
|
||||
name: email
|
||||
labels:
|
||||
alertmanagerConfig: email
|
||||
spec:
|
||||
route:
|
||||
group_by: [email]
|
||||
receiver: test_router
|
||||
# When the first notification was sent, wait 'group_interval' to send a batch
|
||||
# of new alerts that started firing for that group.
|
||||
group_interval: 1s
|
||||
# If an alert has successfully been sent, wait 'repeat_interval' to
|
||||
# resend them.
|
||||
repeat_interval: 24h
|
||||
routes:
|
||||
- match:
|
||||
severity: critical
|
||||
group_wait: 1s
|
||||
- match:
|
||||
severity: error
|
||||
group_wait: 30m
|
||||
- match:
|
||||
severity: warning
|
||||
group_wait: 4h
|
||||
- match:
|
||||
severity: info
|
||||
group_wait: 24h
|
||||
receivers:
|
||||
- name: email_router
|
||||
email_configs:
|
||||
# - to: "{{ .GroupLabels.email }}"
|
||||
- to: 'Lauri Võsandi <lauri@k-space.ee>'
|
||||
from: 'Alerting <alerting@k-space.ee>'
|
||||
smarthost: mail.k-space.ee:465
|
||||
require_tls: false
|
||||
auth_username: 'alerting'
|
||||
auth_password: '5A8m0Y9yC4NcFXztmwMb'
|
||||
headers:
|
||||
subject: "You have {{ .Alerts.Firing | len }} firing alerts at {{ .CommonLabels.severity }} level"
|
||||
html: |
|
||||
Hi {{ .GroupLabels.email }},
|
||||
<p>
|
||||
You have the following firing alerts:
|
||||
<ul>
|
||||
{{ range .Alerts }}
|
||||
<li>{{.Labels.alertname}} on {{ .Labels.instance }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</p>
|
||||
For more info see <a href="https://prom.k-space.ee/alerts">Prometheus alerts page</a>.
|
||||
<br><br>
|
||||
To silence alerts visit <a href="https://am.k-space.ee">Alert manager page</a>.
|
||||
- name: test_router
|
||||
email_configs:
|
||||
# - to: "{{ .GroupLabels.email }}"
|
||||
- to: 'Song Meo <songmeo@k-space.ee>'
|
||||
from: 'Alerting <alerting@k-space.ee>'
|
||||
smarthost: mail.k-space.ee:465
|
||||
require_tls: false
|
||||
auth_username: 'alerting'
|
||||
auth_password:
|
||||
name: email-config
|
||||
key: auth_password
|
||||
headers:
|
||||
subject: "[test] You have {{ .Alerts.Firing | len }} firing alerts at {{ .CommonLabels.severity }} level"
|
||||
html: |
|
||||
Hi,
|
||||
<p>
|
||||
You have the following firing alerts:
|
||||
<ul>
|
||||
{{ range .Alerts }}
|
||||
<li>{{.Labels.alertname}} on {{ .Labels.instance }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</p>
|
||||
For more info see <a href="https://prom.k-space.ee/alerts">Prometheus alerts page</a>.
|
||||
<br><br>
|
||||
To silence alerts visit <a href="https://am.k-space.ee">Alert manager page</a>.
|
@ -15,6 +15,9 @@ kind: Alertmanager
|
||||
metadata:
|
||||
name: alertmanager
|
||||
spec:
|
||||
alertmanagerConfigSelector:
|
||||
matchLabels:
|
||||
alertmanagerConfig: email
|
||||
nodeSelector:
|
||||
dedicated: monitoring
|
||||
tolerations:
|
||||
|
Loading…
Reference in New Issue
Block a user