Buy Percona ServicesBuy Now!

Using the Percona Monitoring and Management Platform

You can access the PMM web interface using the IP address of the host where PMM Server is running. For example, if PMM Server is running on a host with IP 192.168.100.1, access the following address with your web browser: http://192.168.100.1.

See also

Installing PMM Server
Installing PMM Server

The PMM home page that opens provides an overview of the environment that you have set up to monitor. From this page you can access specific monitoring tools, or dashboards. Each dashboard features a collection of metrics. These are graphs of a certain type that represent one specific aspect showing how metric values change over time.

_images/pmm.home-page1.png

The home page is an overview of your system

By default the home page lists most recently used dashboards and helpful links to the information that may be useful to understand PMM better.

The home page lists all hosts that you have set up for monitoring as well as the essential details about their performance such as CPU load, disk performance, or network activity.

Query Analytics

The QAN dashboard enables database administrators and application developers to analyze database queries over periods of time and find performance problems. QAN helps you optimize database performance by making sure that queries are executed as expected and within the shortest time possible. In case of problems, you can see which queries may be the cause and get detailed metrics for them.

_images/query-analytics.png

QAN helps analyze database queries over periods of time and find performance problems.

QAN displays its metrics in both visual and numeric form: the performance related characteristics appear as plotted graphics with summaries.

Open QAN from the PMM Home Page

To start working with QAN, open the list of dashboards on the PMM home page. Then, select a host in the Host field at the top of the page from the list of database instances. where the PMM Client is installed.

The list of queries opens below in a summary table. Be default, QAN shows the top ten queries ranked by %GTT (Grand total time) as a result of monitoring your database server for the last hour. Each query displays three essential metrics: Load, Count, and Latency.

To view more queries, click the Load next 10 queries button below the query summary table.

_images/pmm.qan.query-summary-table.default.1.png

The query summary table shows the monitored queries from the selected database.

Filtering Queries

If you need to limit the list of available queries to only those that you are interested in, use the Query Filter field located above the query summary table.

In the Query Filter field, you can enter a query ID, query abstract, or query fingerprint. The ID is a unique signature of a query and looks like a long hexadecimal number. Note that each query in the summary table displays its ID in the ID column.

The query fingerprint is a simplified form of a query: all specific values are replaced with placeholders. You may enter only a fragment of the fingerprint to view all queries that contain that fragment in their fingerprints.

The query abstract is the portion of the query fingerprint which contains the type of the query, such as SELECT or FIND, and the attributes from the projection (a set of requested columns in case of MySQL database, for example).

When you apply your filter, the query summary table changes to display only the queries which match your criterion. Note that the TOTAL row which runs above the list of queries in the summary table does not change its values. These are always calculated based on all queries run within the selected time or date range.

_images/pmm.qan.query-summary-table.1.png

A list of queries

Selecting Time or Date Range

The query metrics that appear in QAN are computed based on a time period or a range of dates. The default value is the last hour. To set another range use the range selection tool located at the top of your QAN page.

_images/pmm.qan.range-selection.1.png

QAN displays query metrics for the time period or date range that you specify.

The tool consists of two parts. The Quick ranges offers frequently used time ranges.. The date picker sets a range of dates.

Totals of the Query Summary

The first line of the summary table contains the totals of the load, count, and latency for all queries that were run on the selected database server during the time period that you’ve specified.

_images/pmm.qan.query-summary-table.totals.1.png

The totals appear at the top of the query summary table.

The load is the amount of time that the database server spent during the selected time or date range running all queries.

The count is the average number of requests to the server during the specified time or date range.

The latency is the average amount of time that it took the database server to retrieve and return the data.

Queries in the Query Summary Table

Each row in the query summary table contains information about a single query. Each column is query attribute. The Abstract attribute is an essential part of the fingerprint which informs the type of query, such as INSERT, or UPDATE, and the queried tables, or collections. The ID attribute is a unique hexadecimal number associated with the given query.

The Load, Count, and Latency attributes refer to the essential metrics of each query. Their values are plotted graphics and summary values in the numeric form. The summary values have two parts. The average value of the metric and its percentage with respect to the corresponding total value at the top of the query summary table.

Viewing a Specific Value of a Metric

If you hover the cursor over one of the metrics in a query, you can see a concrete value at the point where your cursor is located. Move the cursor along the plotted line to watch how the value is changing.

_images/pmm.qan.query-summary-table.1.png

Hover the cursor to see a value at the point.

Zooming into a Query

Click one of the queries to zoom it in. QAN displays detailed information about the query in the query metrics summary table below the query summary table. The detailed information includes the query type specific metrics. It also contains details about the database and tables which are used in the query.

_images/pmm.qan.query-metrics.1.png

Select a query from the query summary table to open its metrics.

Query Section

In addition to the metrics in the query metrics summary table, QAN displays more information about the query itself. The Query section contains the fingerprint and an example of the query.

_images/pmm.qan.query.1.png

The Query section shows the SQL statement for the selected query.

Explain Section

The Explain section enables you to run EXPLAIN on the selected query directly from the PMM web interface (simply specify the database).

_images/qan-realtime-explain.png

The output appears in two forms: classic and JSON. The classic form presents the attributes of the EXPLAIN command as columns of a table. The JSON format presents the output of EXPLAIN as a JSON document.

_images/pmm.qan.explain.1.png

The two output formats of the EXPLAIN command.

Note that the EXPLAIN command only works with the following statements:

  • SELECT
  • DELETE
  • INSERT
  • REPLACE
  • UPDATE

If you are viewing the details of a query of another type, the Explain section will not contain any data.

Table Info Section

At the bottom, you can run Table Info for the selected query. This enables you to get SHOW CREATE TABLE, SHOW INDEX, and SHOW TABLE STATUS for each table used by the query directly from the PMM web interface.

_images/qan-create-table.png

Configuring Query Analytics

All Query Analytics settings are available from the Query Analytics Settings dashboard. To open this dashboard, use the PMM menu group.

_images/metrics-monitor.menu.pmm.png

The PMM group in the Metrics Monitor navigation menu

Settings Tab

The Settings tab displays the essential configuration settings of the database server selected from the Databases list. From this tab you can see which DSN is being used as well as the database server version.

This tab contains several settings which influence how the monitored data are collected. Note that these settings cannot be changed directly in QAN. You need to set the appropriate options by using the tools from the database server itself. You can, however, select where the database server mentrics are collected from, such as slow log, or Performance Schema. For this, change the value of the Collect from field accordingly.

_images/pmm.qan.settings.1.png

The Settings tab to view the essential settings of the selected database server.

When you choose to collect MySQL data from slow log, a group of read only values becomes available. Note that these settings cannot be set in PMM directly. These are essential parameters of MySQL that affect the operation of slow log. If you need to change these settings refer to the appropriate sections of MySQL documentation.

See also

Percona Server Documentation:

MySQL Documentation:

Status Tab

The Status tab contains detailed information about the current status of the monitored database server. QAN collects this information from the database server directly. For example, in case of a MySQL server, the SHOW STATUS command is used.

Log Tab

The Log tab contains the latest version of the monitored log, such as slow log. At the top of this tab, you may notice when exactly the snapshot was taken.

Viewing Database and Server Summary Information

The PMM System Summary dashboard shows detailed infromation about the selected host (the value of the Host field) and the database server deployed on this host.

The System Summary section contains details about the platform while the Database Summary offers detailed statistics about the database server.

_images/pmm.metrics-monitor.system-summary.png

Accessing information about the system and database

You can download the current values on this dashboard locally if you click the Download Summary button.

Performance Schema

The default source of query data for PMM is the slow query log. It is available in MySQL 5.1 and later versions. Starting from MySQL 5.6 (including Percona Server 5.6 and later), you can choose to parse query data from the Performance Schema. Starting from MySQL 5.6.6, Performance Schema is enabled by default.

Performance Schema is not as data-rich as the slow query log, but it has all the critical data and is generally faster to parse. If you are running Percona Server, a properly configured slow query log will provide the most amount of information with the lowest overhead. Otherwise, using Performance Schema will likely provide better results.

To use Performance Schema, make sure that the performance_schema variable is set to ON:

mysql> SHOW VARIABLES LIKE 'performance_schema';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| performance_schema | ON    |
+--------------------+-------+

If not, add the the following lines to my.cnf and restart MySQL:

[mysql]
performance_schema=ON

Note

Performance Schema instrumentation is enabled by default in MySQL 5.6.6 and later versions. It is not available at all in MySQL versions prior to 5.6.

If the instance is already running, configure the QAN agent to collect data from Performance Schema.

  1. Open the Query Analytics dashboard.
  2. Click the Settings button.
  3. Open the Settings section.
  4. Select Performance Schema in the Collect from drop-down list.
  5. Click Apply to save changes.

If you are adding a new monitoring instance with the pmm-admin tool, use the --query-source perfschema option:

Run this command as root or by using the sudo command

pmm-admin add mysql --user root --password root --create-user --query-source perfschema

For more information, run pmm-admin add mysql --help.

QAN for MongoDB

MongoDB is conceptually different from relational database management systems, such as MySQL or MariaDB. Relational database management systems store data in tables that represent single entities. In order to represent complex objects you may need to link records from multiple tables. MongoDB, on the other hand, uses the concept of a document where all essential information pertaining to a complex object is stored together.

_images/pmm.qan.query-summary-table.mongodb.1.png

A list of queries from a MongoDB host

QAN supports monitoring MongoDB queries. Although MongoDB is not a relational database management system, you analyze its databases and collections in the same interface using the same tools. By using the familiar and intuitive interface of QAN you can analyze the efficiency of your application reading and writing data in the collections of your MongoDB databases.

Note

Supported MongoDB versions

PMM supports MongoDB version 3.2 or higher.

_images/pmm.qan.query-metrics.mongodb.1.png

Analyze MongoDB queries using the same tools as relational database management systems.

Metrics Monitor

The Metrics Monitor tool provides a historical view of metrics that are critical to a database server. Time-based graphs are separated into dashboards by themes: some are related to MySQL or MongoDB, others provide general system metrics.

The default PMM installation provides more than thirty dashboards. To make it easier to reach a specific dashboard, the system offers two tools. The Dashboard Dropdown is a button in the header of any PMM page. It lists all dashboards alphabetically. To locate the required dashboard quickly, start typing its name in the provided text box.

_images/metrics-monitor.dashboard-dropdown.png

With Dashboard Dropdown, search the alphabetical list for any dashboard.

You can also use a navigation menu which groups dashboards by application. Click the required group and then select the dashboard that matches your choice.

Group Dashboards for monitoring ...
Query Analytics QAN component (see Query Analytics
OS The operating system status
MySQL MySQL and Amazon Aurora
MongoDB State of MongoDB hosts
HA High availability
Cloud Amazon RDS and Amazon Aurora
Insight Summary, cross-server and Prometheus
PMM Server settings
_images/metrics-monitor.menu.png

MySQL group selected in the navigation menu

See also

Percona support for high availability
https://www.percona.com/services/support/mysql-ha-cluster-support
List of Metrics Monitor dashboards
See section Metrics Monitor Dashboards

When you open Metrics Monitor for the first time, it loads the Cross Server Graphs dashboard. The credentials used to sign in to Grafana depend on the options that you specified when starting PMM Server:

  • If you do not specify either SERVER_USER or SERVER_PASSWORD, you will log in as an anonymous user. You can change to a different existing Grafana user.
  • If you specify both --SERVER_USER and --SERVER_PASSWORD, then these credentials will be used to sign in to Grafana.
  • If you specify only --SERVER_PASSWORD, a single user (pmm) will be used to sign in to all components (including QAN, Prometheus, Grafana, etc.). You will not be able to change to a different Grafana user.
  • If you specify only --SERVER_USER, this parameter will be ignored.

Warning

The value of the --SERVER_USER parameter may not contain the # or : symbols.

To access the dashboards, provide default user credentials:

  • User: admin
  • Password: admin

On the Home screen, select a dashboard from the list of available Percona Dashboards. For example, the following image shows the MySQL Overview dashboard:

_images/metrics-monitor.png

Each graph has a graph descriptions to display more information about the monitored data without cluttering the interface.

These are on-demand descriptions in the tooltip format that you can find by hovering the mouse pointer over the More Information icon at the top left corner of a graph. When you move the mouse pointer away from the More Information button the description disappears.

_images/pmm.metrics-monitor.description.1.png

Graph descriptions provide more information about a graph without claiming any space in the interface.

Enabling dashboards

In PMM, you can disable the dashboards that you do not require. They will disappear from the Dashboard Dropdown list. You can enable them back again

Using Annotations to Mark Important Application Events

Some events in your application may impact your database. Annotations visualize these events on each dashboard of PMM Server.

_images/pmm-server.mysql-overview.mysql-client-thread-activity.1.png

An annotation appears as a vertical line which crosses a graph at a specific point. Its text explains which event occurred at that time.

To create a new annotation, run pmm-admin annotate command on PMM Client passing it text which explains what event the new annotation should represent. Use the --tags option to supply one or more tags separated by a comma.

You may toggle displaying annotations on metric graphs by using the PMM Annotations checkbox.

_images/pmm-server.pmm-annotations.png

Remove the checkmark from the PMM Annotations checkbox to hide annotations from all dashboards.

See also

Adding annotations

Grafana Documentation:

Creating snapshots

A snapshot is a way to securely share your dashboard with Percona. When created, we strip sensitive data like queries (metrics, template variables, and annotations) along with panel links. The shared dashboard will only be available for viewing by Percona engineers. The content on the dashboard will assist Percona engineers in troubleshooting your case.

You can safely leave the defaults set as they are, but for further information:

Snapshot name

The name Percona will see when viewing your dashboard.

Expire

How long before snapshot should expire, configure lower if required. Percona automatically purges shared dashboards after 90 days.

Timeout (seconds)

Duration the dashboard will take to load before the snapshot is generated. Can lead to empty values on some graphs in the snapshot version

First, open the snapshot that you would like to share. Click the Share button at the top of the page and select the Snapshot command. Finally, click the Share with Percona Team at snapshots.percona.com button.

_images/pmm.metrics-monitor.share.snapshot.png

The Snapshot tab in the Share dialog window.

What to do next

After clicking Share with Percona Team at snapshots.percona.com, wait for the dashboard to be generated, and you will be provided a unique URL that then needs to be communicated to Percona via the ticket.

MySQL MyRocks Metrics Dashboard

The MyRocks storage engine developed by Facebook based on the RocksDB storage engine is applicable to systems which primarily interact with the database by writing data to it rather than reading from it. RocksDB also features a good level of compression, higher than that of the InnoDB storage engine, which makes it especially valuable when optimizing the usage of hard drives.

PMM collects statistics on the MyRocks storage engine for MySQL in the Metrics Monitor information for this dashboard comes from the Information Schema tables.

_images/pmm.metrics-monitor.mysql-myrocks-metrics.1.png

The MySQL MyRocks metrics dashboard

Orchestrator

Orchestrator is a MySQL replication topology management and visualization tool. If it is enabled, you can access it using the /orchestrator URL after PMM Server address. Alternatively, you can click the MySQL Replication Topology Manager button on the PMM Server landing page.

To use it, create a MySQL user for Orchestrator on all managed instances:

GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.*
TO 'orc_client_user'@'%'
IDENTIFIED BY 'orc_client_password’;

Note

The credentials in the previous example are default. If you use a different user name or password, you have to pass them when running PMM Server using the ORCHESTRATOR_PASSWORD and ORCHESTRATOR_USER options.

$ docker run ... -e ORCHESTRATOR_ENABLED=true ORCHESTRATOR_USER=name -e ORCHESTRATOR_PASSWORD=pass ... percona/pmm-server:latest

Then you can use the Discover page in the Orchestrator web interface to add the instances to the topology.

Note

Orchestrator is not enabled by default starting with PMM 1.3.0

Orchestrator was included into PMM for experimental purposes. It is a standalone tool, not integrated with PMM other than that you can access it from the landing page.

In version 1.3.0 and later, Orchestrator is not enabled by default. To enable it, see Additional options in the Running PMM Server via Docker section.

Visit Percona Store


General Inquiries

For general inquiries, please send us your question and someone will contact you.