[英]Why can't grafana send email?
Pull grafana
helm chart from official site.从官方网站拉出
grafana
掌舵图。
https://github.com/kubernetes/charts/tree/master/stable/grafana https://github.com/kubernetes/charts/tree/master/stable/grafana
Set email send configuration in values.yaml
file:在
values.yaml
文件中设置电子邮件发送配置:
https://github.com/kubernetes/charts/blob/master/stable/grafana/values.yaml#L363 https://github.com/kubernetes/charts/blob/master/stable/grafana/values.yaml#L363
[smtp]
enabled = true
host = smtp.gmail.com:587
user = sender@gmail.com
password = sender_password
;cert_file =
;key_file =
skip_verify = true
from_address = sender@gmail.com
Then install it at local:然后在本地安装:
$ helm install grafana
Test send email, failed.测试发送邮件,失败。 Don't know why.
不知道为什么。
You should probably check grafana logs first:您可能应该先检查 grafana 日志:
$ kubectl logs <grafana-pod-name> --tail=20
Logs will have the error.日志会有错误。 I tried with gmail and had to enable
Allow less secure apps
under Apps with account access
in security settings of gmail account.我尝试使用 gmail,并且必须在 gmail 帐户的安全设置中的
Apps with account access
Allow less secure apps
下启用Allow less secure apps
Apps with account access
。
PS: I am using smtp port 465 for gmail. PS:我为 gmail 使用 smtp 端口 465。
Looks like a firewall issue.看起来像是防火墙问题。 Please share the error logs
请分享错误日志
I think I know what is up.我想我知道发生了什么。
The该
user:
password:
fields are not for your email address and password, but SMTP user and SMTP password credentials.字段不是用于您的电子邮件地址和密码,而是用于 SMTP 用户和 SMTP 密码凭据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.