I am using the PMM appliance on AWS and trying to set up SMTP settings but I cannot for the life of me find out where they are stored or can be changed. There are immutable settings in the web interface but these do not appear to be in /etc/grafana/grafana.ini, the settings page says they can be overridden by custom.ini but I can’t find out where that is and I can’t find any environment variables set.
Does anyone have any idea how this is set up in the appliance? It does not appear to be using Docker.
Hi @davidl
Welcome to the Community!
SMTP settings can be found inside the container of pmm-server. Connect to the container as below:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
acc4046ec4ba percona/pmm-server:2 "/opt/entrypoint.sh" 36 minutes ago Up 36 minutes (healthy) 80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp pmm-server
docker exec -it pmm-server bash
[root@acc4046ec4ba opt] # cd /etc/grafana/
[root@acc4046ec4ba grafana] # ls
grafana.ini ldap.toml
In grafana.ini, add the smtp config as below for gmail, for other than gmail, please check with your provider:
enabled=true
host=smtp.gmail.com:587
user=<user@email-id>
password=<app-password>
skip_verify=false
from_address=<from-address@mail-id>
from_name=<Name of the alert, could be any>
Once, done, restart the PMM-Server container with:
100% what @Mukesh_Kumar said but be careful, your grafana.ini could be replaced by an upgrade of PMM (typically when there’s a significant Grafana upgrade in PMM) so it’s very easy to lose these config settings if you’re not careful. I prefer the cleaner method of upgrading by re-running my docker run command each time with the newest version tag available and at the same time I have all the grafana.ini variables passed in at that point.
Yes, that looks as if it has picked up the settings OK by adding in the smtp section. I just need some real SMTP settings from our infrastructure guys…
The AWS appliance doesn’t seem to use docker so I don’t think the above applies.