Install Percona Monitoring and Management on Docker
Percona Monitoring and Management (PMM) is an open-source database monitoring, management, and observability solution for MySQL, PostgreSQL, and MongoDB.
It provides tools to observe database health, analyze performance trends, troubleshoot issues, and execute database management tasks—whether your databases are on-premises or in the cloud.
This guide focuses on the Docker container method for installing PMM Server. All PMM deployments use a unified containerized architecture, with containers running in rootless mode.
While Docker is covered here, you can also deploy PMM using:
- Podman
- Helm on Kubernetes (Technical Preview)
- Virtual appliance (OVA) – uses Podman internally
- Amazon AWS AMI – uses Podman internally
For instructions on these alternative deployment methods, see the official PMM documentation for detailed instructions.
Prerequisites Before starting the installation, ensure your system meets the following requirements:- Storage: 1 GB per monitored database node (with the default 30-day retention period)
- Memory: Minimum 2 GB RAM per monitored database node
- CPU: 2 cores recommended for basic monitoring
- Ports: Ensure TCP traffic is allowed on port 443 for secure communication
- Docker: required for PMM Server installation. If you prefer other deployment options (Podman, Kubernetes, OVA, AMI), see the official PMM documentation for detailed instructions.
- Percona Release Tool: required for PMM Client installation on RedHat-based or Debian-based systems.
Step 1: Install PMM Server
Step 2: Install PMM Client
sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm2. Install PMM Client:
sudo percona-release enable pmm3-client sudo yum install -y pmm-client
Ubuntu: Install PMM Client
1. Install Percona Release Repository:wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb
sudo dpkg -i percona-release_latest.generic_all.deb
sudo percona-release enable pmm3-client
sudo apt update
sudo apt install -y pmm-client
Step 3: Connect PMM Client to Server
pmm-admin config --server-insecure-tls --server-url=https://admin:<admin_password>@<PMM_SERVER_IP>:443
Step 4: Create a PMM user for monitoring
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_password>' WITH MAX_USER_CONNECTIONS 10; GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'127.0.0.1';For MySQL 5.7:
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_password>' WITH MAX_USER_CONNECTIONS 10; GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, SUPER ON *.* TO 'pmm'@'127.0.0.1';2. Enable monitoring:
pmm-admin add mysql --query-source=perfschema --username=pmm --password=<your_password>
CREATE USER pmm WITH SUPERUSER ENCRYPTED PASSWORD '<your_password>';2. Add this line to the `pg_hba.conf` file:
local all pmm md53. Configure pg_stat_monitor in the `postgresql.conf` file:
shared_preload_libraries = 'pg_stat_monitor' pg_stat_monitor.pgsm_query_max_len = 20484. Create the required extension:
CREATE EXTENSION pg_stat_monitor;5. Enable PostgreSQL monitoring:
sudo pmm-admin add postgresql --username=pmm --password=<your_password>
db.createRole({ "role": "explainRole", "privileges": [{ "resource": { "db": "", "collection": "" }, "actions": [ "collStats", "dbHash", "dbStats", "find", "listIndexes", "listCollections" ] }], "roles": [] })2. Create a monitoring user:
db.getSiblingDB("admin").createUser({ "user": "pmm", "pwd": "<your_password>", "roles": [ { "role": "explainRole", "db": "admin" }, { "role": "clusterMonitor", "db": "admin" }, { "role": "read", "db": "local" } ] })3. Enable MongoDB monitoring:
sudo pmm-admin add mongodb --username=pmm --password=<your_password>
sudo pmm-admin add proxysql --username=pmm --password=<your_password>
sudo pmm-admin add haproxy --listen-port=8404
- Access PMM Web Interface from `https://<PMM_SERVER_IP>`. Make sure to change the default ` admin`/`admin` credentials immediately after logging in.
- Check the Instance Summary dashboard to confirm data collection for all monitored services. Test the alerting functionality to ensure it’s working as expected.
- Set up additional users and roles for access control. Configure SSL/TLS for secure communication and review firewall rules to ensure proper network security.
- Adjust data retention periods and collection intervals to optimize performance. Monitor resource usage (CPU, memory, disk) and make adjustments as needed.
- Find complete install instructions Percona documentation
- Join the discussion on Percona Forums
- Report any issues on GitHub
Need help with your open source setup?
By submitting my information I agree that Percona may use my personal data in sending communication to me about Percona services. I understand that I can unsubscribe from the communication at any time in accordance with the Percona Privacy Policy. This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.