Hi,
Could I use directly the relay:25 in grafana.ini config?
I know that is not a wise configuration and recommended will be to have a localhost:25 (sendmail).
PaaS: OpenShift Conatiner Platform (Grafana Container).
######### SMTP / Emailing ########
[smtp]
enabled = true
host = relay:25
;user = username*
;password = Password!*
;cert_file =*
;key_file =*
;skip_verify = true*
from_address = grafana@domain.com
;from_name = Grafana*
Kind Regards,
Florian
That should work. There’s no recommendation to have smtp
be localhost
specifically (it’s just a sensible default), your SMTP server should be one which works for you, is sufficiently stable, and which doesn’t end up in the spam-folder for the recipients. It’s important that you make sure your relay cannot be abused by anyone other than yourself (we have enough erroneously configured SMTP servers on the internet as-is), but that is outside of the scope for setting up Grafana
1 Like
Thank you, I’ll make a try and come back with a feedback.
@emiltullstedt @coolitoring
I think I found the strange behavior but I cannot explain this for the moment.
In Grafana GUI (Admin):
smtp |
|
cert_file |
|
ehlo_identity |
|
enabled |
false |
from_address |
admin@grafana.localhost |
from_name |
Grafana |
host |
localhost:25 |
But in the /etc/grafana/grafana.ini
######### SMTP / Emailing ########
[smtp]
enabled = true
host = relay:25
;user = username*
;password = Password!*
;cert_file =*
;key_file =*
;skip_verify = true*
from_address = grafana@domain.com
;from_name = Grafana*
Deployed in OpenShift Container Platform.
I’m trying to solve the issue but the things are not changing it seems.
Kind Regards,
Florian
My configmap grafana.ini is not overriding defaults.in but if Ill go in my container I can find the configuration present in grafana.ini.
cat /etc/grafana/grafana.ini
######### SMTP / Emailing ########
[smtp]
enabled = true
host = relay:25
;user = username*
;password = Password!*
;cert_file =*
;key_file =*
;skip_verify = true*
from_address = grafana@domain.com
;from_name = Grafana*
/usr/share/grafana $ cat /usr/share/grafana/conf/defaults.ini | grep -A15 smtp**strong text**
[smtp]
enabled = false
host = localhost:25
user =
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password =
cert_file =
key_file =
skip_verify = false
from_address = admin@grafana.localhost
from_name = Grafana
ehlo_identity =
[emails]
welcome_email_on_sign_up = false
templates_pattern = emails/*.html
Where do I find Grafana init.d script in grafana container to force the usage of --config /etc/grafana/grafana.ini.
Solved…
Forced Grafana container.
/bin/sh -c /usr/share/grafana/bin/grafana-cli plugins install jdbranham-diagram-panel && /usr/share/grafana/bin/grafana-cli plugins install grafana-piechart-panel && /usr/share/grafana/bin/grafana-server --config=/etc/grafana/grafana.ini