Install Percona Monitoring and Management

Step 1: Install Server

Applies to: All Docker compatible *nix based systems
Requirements: Docker

1. Create data volume:

sudo  docker create -v /srv --name pmm-data percona/pmm-server:2 /bin/true

2. Create pmm-server docker container:

sudo  docker run -d -p 80:80 -p 443:443 --volumes-from pmm-data --name pmm-server --restart always percona/pmm-server:2

3. Connect to Percona Monitoring and Management:
https://<IP Address or hostname of your Percona Monitoring and Management Server>/
Default username/password is admin/admin and should be changed on first login

Step 2: Install Client

Choose either Ubuntu or Red Hat:

Requirements: None

1. Download Percona Repo Package

wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb

2. Install Percona Repo Package

sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb

3. Update apt cache

sudo apt-get update

4. Install Percona Monitoring and Management Client

sudo apt-get install pmm2-client

Requirements: None

1. Download and install Percona Repo Package

sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

2. Install Percona Monitoring and Management Client

sudo yum install pmm2-client

Step 3: Connect Client to Server

Applies to: All (optional if only using AWS Monitoring)

Requirements: Client to server communication to secure port on pmm-server (443 assumed) — must be performed on every system to be monitored.

Register Percona Monitoring and Management client with server

sudo pmm-admin config --server-insecure-tls --server-url=https://admin:<password>@localhost

Step 4: Monitor Database

Applies to: All

Requirements: Server to client communication over ports, 42000 - 51999 by default.

Create a Percona Monitoring and Management specific user for monitoring (using mysql CLI)

Create user 'pmm'@'localhost' identified by '<password>';
Grant all privileges on *.* to 'pmm'@'localhost' with grant option;
Flush privileges;

Register the server for monitoring

sudo  pmm-admin add mysql --username=pmm --password=<password> --query-source=perfschema <friendlyName>

Create a Percona Monitoring and Management specific user for monitoring (using mysql CLI)

Grant all privileges on *.* to 'pmm'@'localhost' identified by '<password>' with grant option;
Flush privileges;

Register the server for monitoring

sudo pmm-admin add mysql --username=pmm --password=<password> --query-source=perfschema <friendlyName>

Create a Percona Monitoring and Management specific user for Monitoring (using the postgres CLI)

CREATE USER pmm WITH SUPERUSER ENCRYPTED PASSWORD '<password>';

Register the server for monitoring

sudo pmm-admin add postgresql --username='pmm' --password=<password> <friendlyName>

Create a Percona Monitoring and Management specific user for monitoring (from the MongoDB CLI)

Enter the MongoDB Console: mongo

use admin

db.createRole({
role: "explainRole",
privileges: [{
resource: {
db: "",
collection: ""
},
actions: [
"listIndexes",
"listCollections",
"dbStats",
"dbHash",
"collStats",
"find"
]
}],
roles:[]
})

db.getSiblingDB("admin").createUser({
user: "pmm",
pwd: "<password>",
roles: [
{ role: "explainRole", db: "admin" },
{ role: "clusterMonitor", db: "admin" },
{ role: "read", db: "local" }
]
})
exit

Register the server for monitoring

sudo pmm-admin add mongodb --username=pmm --password=<password> <friendlyName>

AWS Configuration

  • You will need your AWS RDS Access Key and RDS Secret Access Key
  • This key should have permission to monitor RDS and it is recommended that you enable "Enhanced Monitoring" for the most robust data
  • You will also need a database username and password with access to login to the RDS instance
  • Your PMM instance will need access to your RDS instance via a TCP port

Percona Monitoring and Management Configuration

  • From Percona Monitoring and Management Home Dashboard choose PMM menu → PMM Add Instance
  • Choose 'Add an AWS RDS MySQL or Aurora MySQL Instance'
  • Enter your AWS Access Key and Secret Access Key then click "Discover"
  • You will be presented with all instances your access key has access to, simply click 'Start Monitoring' next to the desired instance
  • On the resulting screen you should not need to change any values, simply enter the credentials for your DB instance
  • Optionally, you can fill in labels or toggle any of the Additional Options, or click the 'Add Service' button at the bottom

Congratulations! You should now have a successful basic PMM installation. We encourage you to click through the PMM application to ensure your configured database(s) are appearing within the PMM interface and are collecting data as expected.


For more advanced installation and configuration options, please see the full download and documentation pages, or visit our Percona Monitoring and Management Forum for additional assistance.