gpt4 book ai didi

当 root_url 设置为 '%(protocol)s://%(domain)s:%(http_port)s/grafana' 时,Grafana 电子邮件没有正确的 url

转载 作者:行者123 更新时间:2023-12-04 15:35:07 28 4
gpt4 key购买 nike

我正在为电子邮件邀请设置 Grafana Smtp。我正在使用 grafana helm chart,我的配置如下所示 -

grafana.ini:
smtp:
enabled: true
host: smtp.sendemail.com:587
user: 'someuser'
password: 'somepassword'
from_address: join-grafana@somewhere.com
from_name: Join Us At Grafana
server:
root_url: '%(protocol)s://%(domain)s:%(http_port)s/grafana'
serve_from_sub_path: true

当我发送电子邮件邀请时,电子邮件包含指向 http://localhost:3000/grafana/ 的链接...不是我设置的域名;对于各种用途,我都可以通过域名使用 grafana url,例如 - https://somedomain.com/grafana .

可能有什么问题?

最佳答案

您需要实际定义所有变量,否则它们将使用默认值,这就是您在电子邮件中看到的;如果您像我一样通过代理服务器运行,则可能需要更改 URL 模板:

[server]
# Protocol (http, https, h2, socket)
protocol = http

# The http port to use
http_port = 3030

# The public facing domain name used to access grafana from a browser
domain = metrics.example.com

# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
root_url = 'https://%(domain)s/grafana/'

关于当 root_url 设置为 '%(protocol)s://%(domain)s:%(http_port)s/grafana' 时,Grafana 电子邮件没有正确的 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60049258/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com