Welcome to PMM
Relevant source files
The following files were used as context for generating this wiki page:
Percona Monitoring and Management (PMM) is a comprehensive, open-source database monitoring solution designed to provide a "single pane of glass" for MySQL, MongoDB, PostgreSQL, Valkey, and Redis environments. It enables users to reduce infrastructure complexity, optimize database performance, and improve data security across on-premises, cloud, and hybrid deployments.
Sources: README.md:17-25, ui/README.md:3-10
The system is structured as a client-server architecture, where the PMM Client resides on the monitored nodes to collect metrics and query data, while the PMM Server aggregates this information for visualization, alerting, and analysis.
Sources: CONTRIBUTING.md:4-10, README.md:39-45
System Architecture
PMM is built from several distributed components organized into Server-side and Client-side repositories.
Component Overview
| Component | Responsibility | Relevant Files/Repos |
|---|---|---|
| PMM Server | Manages configuration, data storage, and the web UI. | percona/pmm-managed, percona/qan-api |
| PMM Client | Collects metrics and query data from monitored nodes. | percona/pmm-agent, percona/node_exporter |
| User Interface | Provides dashboards and Query Analytics (QAN). | percona/grafana, percona/ui, percona/dashboards |
Sources: CONTRIBUTING.md:15-55
Logical Architecture Flow
The following diagram illustrates the interaction between the monitored databases, the PMM Client components, and the PMM Server backend.
The PMM Agent orchestrates exporters (e.g., mysqld_exporter, postgres_exporter) and vmagent to send data to VictoriaMetrics, while Query Analytics data is processed via the QAN API.
Sources: CONTRIBUTING.md:15-50, README.md:41-45
Key Features
Query Analytics (QAN)
QAN provides detailed insights into query execution over time. It allows users to identify high-latency queries, analyze execution counts, and resolve performance issues at the source.
Sources: ui/apps/pmm/src/contexts/tour/steps/product.messages.ts:13-19
Percona Advisors
Built-in Advisors proactively scan connected databases for security threats, configuration errors, and performance degradation. These checks identify potential data loss or corruption risks.
Sources: README.md:33-37, ui/apps/pmm/src/contexts/tour/steps/product.messages.ts:31-35
Alerting & Management
PMM includes a centralized alerting system based on Grafana and Percona templates. It also provides management tools for inventory and backups, supporting Point-in-Time recovery for MySQL and MongoDB.
Sources: ui/apps/pmm/src/contexts/tour/steps/product.messages.ts:24-30, ui/apps/pmm/src/contexts/tour/steps/product.messages.ts:37-41
Development and Contribution
PMM utilizes a "devcontainer" approach for development, allowing contributors to run a full PMM environment within Docker.
Local Environment Setup
To set up a local development environment for the backend (pmm-managed):
- Clone the repository.
- Run
make env-upto start the development container. - Use
make env TARGET=run-managedto apply code changes.
Sources: managed/CONTRIBUTING.md:12-25, CONTRIBUTING.md:125-132
UI Development
The UI is built using a modern stack including React, TypeScript, and Vite.
# Setup UI dependencies
make setup
# Run in development mode
make dev
Sources: ui/README.md:16-30
Technology Stack Summary
| Layer | Technologies |
|---|---|
| Backend | Go (Golang), gRPC, PostgreSQL |
| Frontend | React, TypeScript, Grafana, Vite |
| Data Storage | VictoriaMetrics (Metrics), ClickHouse (Queries) |
| Documentation | MkDocs, Markdown, Mermaid |
Sources: CONTRIBUTING.md:35-40, ui/README.md:16-24, documentation/mkdocs-base.yml:68-100
API and Documentation
PMM APIs are defined using Protocol Buffers (.proto files) and are exposed via gRPC and a JSON gateway. Documentation is managed using MkDocs and published via GitHub Pages/ReadMe.com.
Sources: CONTRIBUTING.md:85-95, api/README.md:1-20
Conclusion
PMM serves as a critical tool for database administrators and developers to maintain the health and performance of database clusters. By combining metrics collection, query analysis, and proactive advisor checks, it provides a holistic view of the database environment.
Sources: README.md:17-37