hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
228 stars 64 forks source link

SMTP Settings? #73

Closed greenwoodsteven closed 4 years ago

greenwoodsteven commented 4 years ago

How can one set the Email server settings (SMTP) in grafana for hassio?

More Infos here: https://grafana.com/docs/grafana/latest/installation/configuration/#smtp

thanks in advance

addons-assistant[bot] commented 4 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.

sinclairpaul commented 4 years ago

Set the Environment Variables:

https://github.com/hassio-addons/addon-grafana/blob/master/grafana/DOCS.md#option-env_vars

GitHub
hassio-addons/addon-grafana
Grafana - Home Assistant Community Add-ons. Contribute to hassio-addons/addon-grafana development by creating an account on GitHub.
greenwoodsteven commented 4 years ago

For those interested here is my working hassio grafana smtp config: ` plugins: [] env_vars:

Note that this is saved in hassio grafana's config and NOT hassio's config.

Note that the client side validation only allowed JSON valid entries e.g. ` [ { name: "GF_SMTP_ENABLED", value: "true" },

{
    name: "GF_SMTP_HOST",
    value: "smtp.googlemail.com:587"
},

{
    name: "GF_SMTP_USER",
    value: "myemail@GOOGLEMAIL.COM"
},

{
    name: "GF_SMTP_PASSWORD",
    value: "xxxx"
},

{
    name: "GF_SMTP_SKIP_VERIFY",
    value: "true"
},

{
    name: "GF_SMTP_FROM_ADDRESS",
    value: "myemail@GOOGLEMAIL.COM"
},

{
    name: "GF_SMTP_FROM_NAME",
    value: "GRAFANA"
},

] ` As a side note, grafana's email alert supports image attachments. In order for this to work the grafana-image-renderer (https://grafana.com/grafana/plugins/grafana-image-renderer/installation) plugin needs to be installed (also over the hassio grafana config). Unfortunately the grafana logs gave a "not supported" message after the installation of this plugin. Other plugins worked.

Note to admin, the ` backticks do not render content as code from the wyswig. ;(

addons-assistant[bot] commented 4 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.