Docs / Databases / How to Set Up Database Monitoring with PMM

How to Set Up Database Monitoring with PMM

By Admin · Mar 2, 2026 · Updated Apr 23, 2026 · 30 views · 3 min read

How to Set Up Database Monitoring with PMM

Percona Monitoring and Management (PMM) is a free, open-source platform for monitoring MySQL, PostgreSQL, MariaDB, and MongoDB databases. It provides query analytics, performance dashboards, and alerting, giving you deep visibility into database behavior on your Breeze instances.

Architecture Overview

PMM consists of two components:

  • PMM Server — the central monitoring hub that collects metrics, stores them, and provides the web-based dashboard. Deploy this on a dedicated Breeze instance.
  • PMM Client — installed on each Breeze instance running a database. It collects metrics and query data, then sends them to the PMM Server.

Deploying PMM Server

The easiest way to run PMM Server is with Docker on a Breeze instance:

sudo apt install -y docker.io
sudo systemctl enable docker && sudo systemctl start docker

sudo docker pull percona/pmm-server:2
sudo docker volume create pmm-data

sudo docker run -d \
  --name pmm-server \
  --restart always \
  -p 443:443 \
  -p 80:80 \
  -v pmm-data:/srv \
  percona/pmm-server:2

Access the PMM dashboard at https://your-breeze-ip. The default credentials are admin / admin. Change the password immediately upon first login.

Installing PMM Client

On each Breeze instance running a database:

sudo apt install -y pmm2-client

# Or install from Percona repository
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo apt update
sudo apt install -y pmm2-client

Registering the Client with the Server

Connect the client to your PMM Server:

sudo pmm-admin config --server-insecure-tls \
  --server-url=https://admin:YourPassword@pmm-server-ip:443

Adding MySQL Monitoring

Create a dedicated MySQL user for PMM on your database Breeze instance:

mysql -u root -p -e "
CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'PMMpass123!';
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'localhost';
FLUSH PRIVILEGES;"

Register the MySQL service with PMM:

sudo pmm-admin add mysql --username=pmm --password=PMMpass123! \
  --query-source=perfschema --service-name=breeze-mysql

Adding PostgreSQL Monitoring

Create a PostgreSQL user and enable the required extensions:

sudo -u postgres psql -c "
CREATE USER pmm WITH PASSWORD 'PMMpass123!';
GRANT pg_monitor TO pmm;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
CREATE EXTENSION IF NOT EXISTS pg_stat_monitor;"

Register PostgreSQL:

sudo pmm-admin add postgresql --username=pmm --password=PMMpass123! \
  --service-name=breeze-postgres

Key Dashboards

PMM provides dozens of pre-built Grafana dashboards:

  • Query Analytics (QAN) — shows query fingerprints sorted by total execution time, helping you find the most expensive queries.
  • MySQL Instance Summary — connections, threads, InnoDB buffer pool hit rate, and replication lag.
  • PostgreSQL Instance Summary — active connections, transaction rates, tuple operations, and cache hit ratio.
  • Node Summary — CPU, memory, disk I/O, and network metrics for the underlying Breeze instance.

Setting Up Alerts

Configure alerting rules in the PMM dashboard under Alerting → Alert Rules. Common alerts include high replication lag, connection saturation, and low buffer pool hit ratios. PMM supports email, Slack, PagerDuty, and webhook notification channels to keep your team informed about database health across your Breeze fleet.

Was this article helpful?