Updating Grafana configuration file to configure custom SMTP settings

2/18/2019

I used HELM to install the Prometheus operator and kube-prometheus into my kubernetes cluster using the following commands:

helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring --set rbacEnable=false
helm install coreos/kube-prometheus --name kube-prometheus --set global.rbacEnable=false --namespace monitoring 

Everything is running fine, however, I want to set up email alerts and in order to do so I must configure the SMTP settings in "custom.ini" file according to the grafana website. I am fairly new to Kuberenetes and using HELM charts, therefore I have no idea which command I would use to access this file or make updates to it? Is it possible to do so without having to redeploy?

Can anyone provide me with a command to update custom values?

-- Josh L
azure-aks
grafana
kubernetes
kubernetes-helm
prometheus

1 Answer

2/19/2019

You could pass grafana.env value to add SMTP-related settings:

GF_SMTP_ENABLED=true,GF_SMTP_HOST,GF_SMTP_USER and GF_SMTP_PASSWORD

should do the trick. The prometheus-operator chart relies on the upstream stable/grafana chart (although, still using the 1.25 version)

-- Alessandro Vozza
Source: StackOverflow