Percona Resources

Software
Downloads

All of Percona’s open source software products, in one place, to download as much or as little as you need.

Valkey Contribution

Product Documentation

Why Percona for MongoDB?

Why Percona for PostgreSQL?

Percona Blog

Percona Blog

Our popular knowledge center for all Percona products and all related topics.

Community

Percona Community Hub

A place to stay in touch with the open source community

Events

Percona Events Hub

See all of Percona’s upcoming events and view materials like webinars and forums from past events

About

About Percona

Percona is an open source database software, support, and services company that helps make databases and applications run better.

Percona in the News

See Percona’s recent news coverage, press releases and industry recognition for our open source software and support.

Our Customers

Our Partners

Careers

Contact Us

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.
Architecture support – PMM Client is fully supported on both x86_64 and ARM64 architectures – PMM Server is not currently available as a native ARM64 build but can run x86_64 images on ARM platforms via emulation using Docker (or Podman).

Step 1: Install PMM Server

You can install PMM Server on any Docker-compatible Linux system. Make sure you have Docker engine installed and running `root` or `sudo` privileges:
curl -fsSL https://www.percona.com/get/pmm | /bin/bash
wget -qO - https://www.percona.com/get/pmm | /bin/bash

Step 2: Install PMM Client

1. Install Percona Release Repository:
sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
2. 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
2. Install PMM Client:
sudo percona-release enable pmm3-client
sudo apt update
sudo apt install -y pmm-client

Step 3: Connect PMM Client to Server

Register the Client with your PMM Server, replacing `<PMM_SERVER_IP>` with your PMM Server’s IP address or hostname:

pmm-admin config --server-insecure-tls --server-url=https://admin:<admin_password>@<PMM_SERVER_IP>:443

Step 4: Create a PMM user for monitoring

1. Run the following SQL commands to create a dedicated user for PMM monitoring: For MySQL 8.0:
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>
1. Create superuser for monitoring:
CREATE USER pmm WITH SUPERUSER ENCRYPTED PASSWORD '<your_password>';
2. Add this line to the `pg_hba.conf` file:
local all pmm md5
3. Configure pg_stat_monitor in the `postgresql.conf` file:
shared_preload_libraries = 'pg_stat_monitor'
pg_stat_monitor.pgsm_query_max_len = 2048
4. Create the required extension:
CREATE EXTENSION pg_stat_monitor;
5. Enable PostgreSQL monitoring:
sudo pmm-admin add postgresql --username=pmm --password=<your_password>
1. Create a monitoring role with the required privileges:
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>
1. Configure ProxySQL stats credentials. 2. Enable monitoring:
sudo pmm-admin add proxysql --username=pmm --password=<your_password>
1. Configure Prometheus metrics endpoint in HAProxy. 2. Enable monitoring:
sudo pmm-admin add haproxy --listen-port=8404
Post-installation steps
  1. Access PMM Web Interface from `https://<PMM_SERVER_IP>`. Make sure to change the default ` admin`/`admin` credentials immediately after logging in.
  2. Check the Instance Summary dashboard to confirm data collection for all monitored services. Test the alerting functionality to ensure it’s working as expected.
  3. Set up additional users and roles for access control. Configure SSL/TLS for secure communication and review firewall rules to ensure proper network security.
  4. Adjust data retention periods and collection intervals to optimize performance. Monitor resource usage (CPU, memory, disk) and make adjustments as needed.
Support resources

Need help with your open source setup?

Percona Experts will guide you through implementation and support you long-term.

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.