We are pleased to announce the release of PMM 2 Beta! PMM (Percona Monitoring and Management) is a free and open-source platform for managing and monitoring MySQL, MongoDB, and PostgreSQL performance.
- Query Analytics:
- MySQL and MongoDB – Slow log, PERFORMANCE_SCHEMA, and Profiler data sources
- Support for large environments – default view all queries from all instances
- Filtering – display only the results matching filters such as the schema name or the server instance
- Sorting and more columns – now sort by any column.
- Modify Columns – Add one or more columns for any field exposed by the data source
- Sparklines – restyled sparkline targeted at making data representation more accurate
- Labels – Prometheus now supports auto-discovered and custom labels
- Inventory Overview Dashboard – Displays the agents, services, and nodes which are registered with PMM Server
- Environment Overview Dashboard – See issues at a glance across multiple servers
- API – View versions and list hosts using the API
- MySQL, MongoDB, and PostgreSQL Metrics – Visualize database metrics over time
pmm-agent– Provides secure remote management of the exporter processes and data collectors on the client
PMM 2 Beta is still a work in progress – you may encounter some bugs and missing features. We are aware of a number of issues, but please report any and all that you find to Percona’s JIRA.
This release is not recommended for Production environments.
PMM 2 is designed to be used as a new installation – please don’t try to upgrade your existing PMM 1 environment.
Query Analytics Dashboard
Query Analytics Dashboard now defaults to display all queries on each of the systems that are configured for MySQL PERFORMANCE_SCHEMA, Slow Log, and MongoDB Profiler, and includes comprehensive filtering capabilities.
Query Analytics Overview
You’ll recognize some of the common elements in PMM 2 Query Analytics such as the Load, Count, and Latency columns. However, there are new elements such as the filter box and more arrows on the columns:
Query Analytics continues to deliver detailed information regarding individual query performance
Filter and Search By
There is a filtering panel on the left, or use the search by bar to set filters using key:value syntax. For example, I’m interested in just the queries related to mysql-sl2 server, I could then type d_server:mysql-sl2:
Sort by any column
This is a much-requested feature from PMM Query Analytics and we’re glad to announce that you can now sort by any column! Just click the small arrow to the right of the column name and:
As you may have already noticed, we have changed the sparkline representation. New sparklines are not points-based lines, but are interval-based, and look like a staircase line with flat values for each of the displayed period:
We also position a single sparkline for only the left-most column and render numeric values for all remaining columns.
Add extra columns
Now you can add a column for each additional field which is exposed by the data source. For example, you can add Rows Examined by clicking the + sign and typing or selecting from the available list of fields:
MySQL Query Analytics Slow Log source
We’ve increased our MySQL support to include both PERFORMANCE_SCHEMA and Slow log – and if you’re using Percona Server with the Extended Slow Log format, you’ll be able to gain deep insight into the performance of individual queries, for example, InnoDB behavior. Note the difference between the detail available from PERFORMANCE_SCHEMA vs Slow Log:
Support for MongoDB Metrics included in this release means you can add a local or remote MongoDB instance to PMM 2 and take advantage of the following view of MongoDB performance:
In this release, we’re also including support for PostgreSQL Metrics. We’re launching PMM 2 Beta with just the PostgreSQL Overview dashboard, but we have others under development, so watch for new Dashboards to appear in subsequent releases!
Environment Overview Dashboard
This new dashboard provides a bird’s-eye view, showing a large number of hosts at once. It allows you to easily figure out the hosts which have issues, and move onto other dashboards for a deeper investigation.
The charts presented show the top five hosts by different parameters:
The eye-catching colored hexagons with statistical data show the current values of parameters and allow you to drill-down to a dashboard which has further details on a specific host.
An important concept we’re introducing in PMM 2 is that when a label is assigned it is persisted in both the Metrics (Prometheus) and Query Analytics (Clickhouse) databases. So, when you browse a target in Prometheus you’ll notice many more labels appear – particularly the auto-discovered (
node_name, etc.) and (soon to be released) custom labels via
We’ve introduced a new dashboard with several tabs so that users are better able to understand which nodes, agents, and services are registered against PMM Server. We have an established hierarchy with Node at the top, then Service and Agents assigned to a Node.
- Nodes – Where the service and agents will run. Assigned a node_id, associated with a machine_id (from /etc/machine-id)
- Examples: bare metal, virtualized, container
- Services – Individual service names and where they run, against which agents will be assigned. Each instance of a service gets a service_id value that is related to a node_id
- Examples: MySQL, Amazon Aurora MySQL
- You can also use this feature to support multiple mysqld instances on a single node, for example: mysql1-3306, mysql1-3307
- Agents – Each binary (exporter, agent) running on a client will get an agent_id value
- pmm-agent is the top of the tree, assigned to a node_id
- node_exporter is assigned to pmm-agent agent_id
- mysqld_exporter and QAN MySQL Perfschema are assigned to a service_id
- Examples: pmm-agent, node_exporter, mysqld_exporter, QAN MySQL Perfschema
You can now see which services, agents, and nodes are registered with PMM Server.
In this example I have PMM Server (docker) running on the same virtualized compute instance as my Percona Server 5.7 instance, so PMM treats this as two different nodes.
For a monitored Percona Server instance, you’ll see an agent for each of these:
- QAN Perfschema
We are exposing an API for PMM Server! You can view versions, list hosts, and more…
The API is not guaranteed to work until GA release – so be prepared for some errors during Beta release.
Browse the API using Swagger at /swagger
Installation and configuration
The default PMM Server credentials are:
Install PMM Server with docker
The easiest way to install PMM Server is to deploy it with Docker. Running the PMM 2 Docker container with PMM Server can be done by the following commands (note the version tag of 2.0.0-beta1):
docker create -v /srv --name pmm-data-2-0-0-beta1 perconalab/pmm-server:2.0.0-beta1 /bin/true
docker run -d -p 80:80 -p 443:443 --volumes-from pmm-data-2-0-0-beta1 --name pmm-server-2.0.0-beta1 --restart always perconalab/pmm-server:2.0.0-beta1
Install PMM Client
Since PMM 2 is still not GA, you’ll need to leverage our experimental release of the Percona repository. You’ll need to download and install the official
percona-release package from Percona, and use it to enable the Percona experimental component of the original repository. See percona-release official documentation for further details on this new tool.
Specific instructions for a Debian system are as follows:
sudo dpkg -i percona-release_latest.generic_all.deb
Now enable the experimental repo:
sudo percona-release disable all
sudo percona-release enable original experimental
apt-get install pmm2-client
Users who have previously installed pmm2-client alpha version should remove the package and install a new one in order to update to beta1.
Please note that leaving experimental repository enabled may affect further package installation operations with bleeding edge software that may not be suitable for Production. You can revert by disabling experimental via the following commands:
sudo percona-release disable original experimental
sudo apt-get update
Once PMM Client is installed, run the
pmm-admin config command with your PMM Server IP address to register your Node:
# pmm-admin config --server-insecure-tls --server-url=https://<IP Address>:443
You should see the following:
Checking local pmm-agent status...
pmm-agent is running.
Registering pmm-agent on PMM Server...
Configuration file /usr/local/percona/pmm-agent.yaml updated.
Reloading pmm-agent configuration...
Adding MySQL Metrics and Query Analytics
MySQL server can be added for the monitoring in its normal way. Here is a command which adds it using the PERFORMANCE_SCHEMA source:
sudo pmm-admin add mysql --use-perfschema --username=pmm --password=pmm
where username and password are credentials for accessing MySQL.
The syntax to add MySQL services (Metrics and Query Analytics) using the Slow Log source is the following:
sudo pmm-admin add mysql --use-slowlog --username=pmm --password=pmm
When the server is added, you can check your MySQL dashboards and Query Analytics in order to view its performance information!
Adding MongoDB Metrics and Query Analytics
You can add MongoDB services (Metrics and Query Analytics) with a similar command:
pmm-admin add mongodb --use-profiler --use-exporter --username=pmm --password=pmm
Adding PostgreSQL monitoring service
You can add PostgreSQL service as follows:
pmm-admin add postgresql --username=pmm --password=pmm
You can then check your PostgreSQL Overview dashboard.
Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQL®, MongoDB®, and PostgreSQL® performance. You can run PMM in your own environment for maximum security and reliability. It provides thorough time-based analysis for MySQL®, MongoDB®, and PostgreSQL® servers to ensure that your data works as efficiently as possible.
Help us improve our software quality by reporting any Percona Monitoring and Management bugs you encounter using our bug tracking system.