Grafana怎么设置忘记密码发送邮箱重置

  1. 环境查看
    系统环境
# cat /etc/redhat-release 
Rocky Linux release 9.4 (Blue Onyx)
# uname -a
Linux RockyEs01003081 5.14.0-427.35.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:24:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

软件环境

# grafana-cli -v
grafana version 10.0.2
  1. 设置SMTP
    修改配置文件设置以下信息
    image
# cat /etc/grafana/grafana.ini|sed -n '788,810p'
[smtp]
# 设置为true
enabled = true
# 邮箱的SMTP地址
host = smtp.exmail.qq.com:465
# 邮箱用户名
user = support04@xxx.com
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
# 邮箱密码,是生成的密钥不是登录密码,如果包含特殊字符则使用"""""""包含
password = """key"""
# 发送的地址,需要设置,否则无法发送邮件
from_address =  support04@xxx.com

重启grafana

# systemctl restart grafana-server.service 
  1. 重置密码
    点击忘记密码
    image
    输入注册的邮箱点击发送重置密码链接
    image
    点击邮箱收到的链接重置密码即可

配置文件默认的domain为localhos还需要修改一个配置

如下所示

domain = 192.168.3.81
posted @ 2025-07-14 14:44  minseo  阅读(29)  评论(0)    收藏  举报