Hi,
I have set up as follows:
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'smtp-xxxxx:465'
smtp_from: 'Alertmanager <[email protected]>'
smtp_auth_username: '[email protected]'
smtp_auth_password: 'xxxx'
require_tls: true
route:
group_by: ['severity','alertname']
group_wait: 30s
group_interval: 5m
repeat_interval: 5m
receiver: mail
receivers:
- name: 'mail'
email_configs:
- to: '[email protected]'
I have tried many permutations of the config without any obvious success. The most I have got to happen is regular messages printed to stdout:
level=warning msg="Notify attempt 1 failed: EOF" source="notify.go:193"
Firstly, the docs don't say very much about configuring email alerts.
2nd, the error message is not helping me at all.
Any suggestions? Many thanks!
how to fix it?
The smtp_from is incorrect. It should be just the email address proper (no "Alertmanager <" or ">"). It's used as the Reverse-Path field (defined in section 4.1.2 of RFC-2821).
Presuming that's the issue, I think this is something that we should have work.
hi @aecolley, i had the same issue with you. but even the smtp_from is correct, actually i configure it with the same value with smtp_auth_username. do you have any insights ? and @estechnical do you still have the issue ?
here's my environment
→ ./alertmanager --version
alertmanager, version 0.3.0 (branch: master, revision: 66142a9)
build user: jiangytcn@XXX
build date: 20160804-03:57:59
go version: go1.6.2
I have now got this working sorry for not updating my post here. I think at various stages I changed things as per other setups/docs/hints I found googling etc.
smtp_from: '[email protected]'
worked for me in the end, so I agree with others.
Here is a revised config example:
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'smtp-xxxxx:465'
smtp_from: '[email protected]'
smtp_auth_username: '[email protected]'
smtp_auth_password: 'xxxx'
require_tls: true
route:
group_by: ['severity','alertname']
group_wait: 30s
group_interval: 5m
repeat_interval: 5m
receiver: mail
receivers:
- name: 'mail'
email_configs:
- to: '[email protected]'
still not working for me, what weird is that if i use google as smtp server, it's ok. but after changed to mailgun, it ended with " failed: EOF" error, i'm sure that the smtp settings are correct
per the guide http://blog.mailgun.com/25-465-587-what-port-should-i-use/ and changing the smtp port to 589 fix the issue :)
Hi, I am not receiving the email from alertmanager. Currently using alertmanager v 0.14.0 in docker container with AWS SES service to send out emails.
The SES service is tested via command line and I could receive emails.
The Slack configuration works, however, it is not sending out resolved notifications even though I had set the send_resolved to true.
global:
templates:
Please advice.
Thanks in advance.
Facing similar issue, AWS SES giving below error,
level=error ts=2019-07-04T13:08:51.42960258Z caller=dispatch.go:264 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="require_tls: true (default), but \"email-smtp.us-east-1.amazonaws.com:465\" does not advertise the STARTTLS extension"
Tried, required_tls: flase, then getting below error,
level=error ts=2019-07-04T13:33:10.9007873Z caller=email.go:147 msg="failed to close SMTP connection" err="write tcp 100.96.2.214:59836->54.235.154.163:587: use of closed network connection"
Working fine with Gmail SMTP.
Most helpful comment
per the guide http://blog.mailgun.com/25-465-587-what-port-should-i-use/ and changing the smtp port to 589 fix the issue :)