45Drives Knowledge Base
KB450245 – Configuring Alertmanager to send Emails
https://knowledgebase.45drives.com/kb/kb450245-configuring-alertmanager-to-send-emails/

KB450245 – Configuring Alertmanager to send Emails

Posted on October 19, 2020 by Rob MacQueen


Scope/Description

Prerequisites

Steps

# vim /etc/alertmanager/alertmanager.yml
global:
  resolve_timeout: 5m
  smtp_smarthost: emailserverhostname:port
  smtp_from: ''
  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: ''

# systemctl restart alertmanager

Verification

# systemctl status alertmanager

Troubleshooting

# docker logs alertmanager