45Drives Knowledge Base |
KB450245 – Configuring Alertmanager to send Emails https://knowledgebase.45drives.com/kb/kb450245-configuring-alertmanager-to-send-emails/ |
# vim /etc/alertmanager/alertmanager.yml
global:
resolve_timeout: 5m
smtp_smarthost: emailserverhostname:port
smtp_from: 'fromemail@example.com'
smtp_require_tls: true
smtp_auth_username: ''
smtp_auth_password: ''
route:
group_by:
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receiver: 'ceph-dashboard'
receivers:
- name: 'ceph-dashboard'
webhook_configs:
- url: 'http://hostname:8443/api/prometheus_receiver'
- url: 'http://hostname:8443/api/prometheus_receiver'
- url: 'http://hostname:8443/api/prometheus_receiver'
- url: 'http://hostname:8443/api/prometheus_receiver'
email_configs:
- to: 'exampleaddress@example.com'
# systemctl restart alertmanager
# systemctl status alertmanager
# docker logs alertmanager