docker - SMTP 未配置,请检查您的 grafana.ini 配置文件的 [smtp] 部

对于通知,我在 Grafana 中添加了通知 channel ,类型为电子邮件,然后单击“发送测试”按钮,但它给出了 -

SMTP not configured, check your grafana.ini config file's [smtp] section

我已经将 Grafana 安装为 docker 容器,因此我进入容器并使用 SMTP 详细信息更新 grafana.ini 文件并反射(reflect)更改,重新启动 Grafana -

docker restart grafana

现在转到通知 channel 并单击“发送测试”,但仍然看到相同的错误。

请帮助理解这里可能出了什么问题,以及哪个日志文件(带有位置)来检查这里究竟出了什么问题。

最佳答案

All options in the configuration file can be overridden using environment variables using the syntax:

GF_<SectionName>_<KeyName>

Where the section name is the text within the brackets. Everything should be uppercase, . and - should be replaced by _. For example, if you have these configuration settings:

# default section
instance_name = ${HOSTNAME}

[security]
admin_user = admin

[auth.google]
client_secret = 0ldS3cretKey

[plugin.grafana-image-renderer]
rendering_ignore_https_errors = true
You can override them on Linux machines with:

export GF_DEFAULT_INSTANCE_NAME=my-instance
export GF_SECURITY_ADMIN_USER=owner
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
export GF_PLUGIN_GRAFANA_IMAGE_RENDERER_RENDERING_IGNORE_HTTPS_ERRORS=true

引用:https://grafana.com/docs/grafana/latest/administration/configuration/#configure-with-environment-variables

关于docker - SMTP 未配置,请检查您的 grafana.ini 配置文件的 [smtp] 部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63276937/

相关文章:

php - 在 Laravel 中通过表格获得一行的最佳方法是什么?

text - 关注 VStack 中的下一个 TextField

image - 在 vim 文件中插入 bash 脚本输出

caching - Mike Acton 的面向数据设计 - 'loops per cache li

reactjs - EsLint 错误解释 no-unused-vars 中的导入语句

postgresql - Postgres JSONB 检索非常慢

c# - 解析值行 1,位置 1 时遇到意外字符

azure - 如何在函数应用中为Azure SignalR服务使用不同的连接字符串?

python - Pandas 在 Linux 中失败,在 Windows 中没有发生 - 缺少数据

perl - 为什么 local 在 STDERR 和 STDOUT 上不起作用?