stefanprodan / dockprom

Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager
MIT License
6.05k stars 1.73k forks source link

Email as a notification receiver #210

Closed diriy closed 3 years ago

diriy commented 3 years ago

Could you please add to documentation what should I do for to configure email sending as a notifier instead of slack?

nightah commented 3 years ago

It's documented over at the Alertmanager docs page.

You can find an example of the alertmanager config.yml below:


route:
    receiver: 'email'

receivers:
    - name: 'email'
      email_configs:
          - send_resolved: true
            to: 'alertmanager@example.com'
            from: '"Alertmanager" <alertmanager@example.com>'
            smarthost: 'mail.example.com:25'
            auth_username: 'user@example.com'
            auth_password: 'passwordhere'
            html: '{{ template "email.default.html" . }}'
diriy commented 3 years ago

Unfortunately this returns me the following error:

alertmanager    | level=info ts=2021-01-18T10:06:19.780Z caller=cluster.go:632 component=cluster msg="gossip not settled but continuing anyway" polls=0 elapsed=25.052748ms
alertmanager exited with code 1

The instance cannot start. What do I do wrong?

diriy commented 3 years ago

@nightah , unfortunately, the problem still exist. any help appreciated.