Percona Pmm 2 docker - Email notification issue

I have done below setup on CentOS server :

I have ran easy install script for Percona PMM 2 setup , which basically do following :

Installs Docker if it is not already installed on your system.
Stops and backs up any PMM Server Docker containers that are currently running.
Pulls and runs the latest PMM Server Docker image.

Page for reference : Easy-install script - Percona Monitoring and Management

Till now all good , As per My understanding I have Percona PMM docker container running on My CentOS server ,I am able to install PMM client of servers which I want to monitor and connect with Percona PMM , Dashboard is all setup and ready.

However I am not able to set up email notification , I have tried editing Grafana.ini file inside docker but of no help , I am also not able to telnet smtp server .

Host server where this docker is residing has all the connectivity and sendmail also setted up and I am able to send email from here .

I am kind of noob here , Request to please assist how to Proceed further.

I have understanding that we can use host network while running docker but am not sure how to configure and do it.

1 Like

So first things first…if you can’t telnet to your SMTP’s server from inside the docker container that has to happen before trying anything else. (and I assume you’ve already installed telnet inside the container to try):
docker exec -it pmm-server bash
yum install telnet
telnet <smtp.server.ip> 25
and you should get a

Connected to smtp.server.ip.
Escape character is '^]'.

if that’s not working do the same thing from the host to narrow in on if your host can hit the SMTP server or if it’s just the container. If neither can telnet to your smtp server’s service port then it’s something outside of PMM (could be host firewall/selinux/iptables, could be your network requires a proxy for external access…could be your host is in a zone that can’t talk to certain other hosts, etc).

Assuming docker container cannot talk to smtp server but server itself can, I’d be looking at your selinux policies to see if you’re getting foiled there (if I had a dollar for every time…). There’s nothing about the setup of the easy install script that would prevent your docker image from getting network access just like your host does. I hope that helps narrow down the culprits.

1 Like