【发布时间】:2023-03-13 19:55:02
【问题描述】:
我正在尝试使用 config.yml 文件中配置的凭据通过 alertmanager 发送电子邮件。
我可以通过 gmail smtp 服务器使用端口 587 发送邮件。
但我的客户实时使用的是 465 端口,我遇到了错误
“第一条记录看起来不像 tls 握手”
下面是我的配置文件
route:
receiver: 'notifications-configuration'
#This receiver name can be any userdefined name
templates:
- '/etc/alertmanager/template/emailnotification.tmpl'
#Send the notifications to below receivers.
#There can be single as well as multiple receivers
#Here there are 2 receivers one is for mail and another is for sending notifications to some API provided
receivers:
- name: 'notifications-configuration'
email_configs:
- from: 'samplemailfrom@gmail.com'
auth_username: samplemailfrom@gmail.com'
auth_password: 'fdsfsdfsdfsdssds'
smarthost: 'smtp.gmail.com:587'
auth_identity: 'samplemailfrom@gmail.com'
tls_config:
insecure_skip_verify: true
to: 'samplemailto@gmail.com'
当我将此 smtp 主机更改为 customersmtphost:465 时,出现上述错误
我搜索了这个问题并找到了许多链接,但我无法弄清楚我应该在 config.yaml 中做哪些更改才能使其正常工作
请提供帮助。在此先感谢
【问题讨论】:
标签: smtp prometheus prometheus-alertmanager