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.
Please see our previous blog for full information on the new features included in PMM2, our latest software release.
To use PMM2 you will need to remove any earlier versions of PMM Server and Client as there is no in-place upgrade path for historical data, and then download and run our latest software.
The easiest way to install PMM Server is to deploy it with Docker. Running the PMM2 Docker container with PMM Server can be done by the following commands (note the version tag of 2):
|
1 |
docker create -v /srv --name pmm-data percona/pmm-server:2 /bin/true<br>docker run -d -p 80:80 -p 443:443 --volumes-from pmm-data --name pmm-server --restart always percona/pmm-server:2 |
Now you can check the newly installed PMM Server in your browser, going to your server by its IP address and using the default credentials:
username: admin
password: admin

You will be prompted to change the admin password after logging in.
You can get PMM2 Client package from the official download page on the Percona web site, or use the official percona-release package from Percona to enable the tools repository, as follows (please see percona-release official documentation for further details on this new tool).
Install the Percona repository:
|
1 |
wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb<br>sudo dpkg -i percona-release_latest.generic_all.deb |
Install the pmm2-client package:
|
1 |
apt-get update<br>apt-get install pmm2-client |
Install the Percona repository:
|
1 |
sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm |
Install the pmm2-client package:
|
1 |
sudo yum update<br>sudo yum install pmm2-client |
Users who have previously installed pmm2-client pre-release versions should fully remove the package and then install the latest available version.
Once PMM Client is installed, run the pmm-admin config command with your PMM Server IP address in order to register with the PMM Server:
Note that you need to pass the authentication string as part of the --server-url. These credentials are the same ones you used to login to PMM Server.
|
1 |
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@<IP Address>:443 |
You should see the following:
|
1 |
Checking local pmm-agent status...<br>pmm-agent is running.<br>Registering pmm-agent on PMM Server...<br>Registered.<br>Configuration file /usr/local/percona/pmm2/config/pmm-agent.yaml updated.<br>Reloading pmm-agent configuration...<br>Configuration reloaded.<br>Checking local pmm-agent status...<br>pmm-agent is running. |
MySQL server can be added for the monitoring in its normal way. Here is a command which adds it using the PERFORMANCE_SCHEMA source:
|
1 |
pmm-admin add mysql --query-source=perfschema --username=pmm --password=pmm |
where username and password are credentials for the monitored MySQL access, which will be used locally on the database host.
The syntax to add MySQL services (Metrics and Query Analytics) using the Slow Log source is the following:
|
1 |
pmm-admin add mysql --query-source=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!
Please refer to PMM 2 documentation to find out how to set up the required permissions and enable profiling with MongoDB.
You can add MongoDB services (Metrics and Query Analytics) with a similar command:
|
1 |
pmm-admin add mongodb --username=pmm --password=pmm |
Please refer to PMM2 documentation to find out how to add PostgreSQL extension for queries monitoring, as well as set up the required user permissions and authentication.
Add PostgreSQL monitoring to your PMM Server with the following command:
|
1 |
pmm-admin add postgresql --username=pmm --password=pmm |
Where username and password parameters should contain actual PostgreSQL user credentials.
You can add ProxySQL service as follows:
|
1 |
pmm-admin add proxysql --username=admin --password=admin |
Please help us improve our software quality by reporting any Percona Monitoring and Management bugs you encounter using our bug tracking system.
Resources
RELATED POSTS