Percona Monitoring and Management (PMMM) deployment

Source: Internet
Author: User
Tags percona docker run

First, the environment: CentOS7.2 (PMM Server) CentOS7.2 MySQL 5.7.16-master (PMM Client) CentOS7.2 MySQL 5.7.16-slave (PMM Client)

Ii. preparatory work

Check the iptables of the three servers to see if SELinux is closed or in permissive

Third, installation

1. Install PMM Server on

At present official PMM only Docker mirror, so need to deploy first Docker

Yum Install Docker

Considering that late monitoring data collection may occupy a certain disk, you want to put the Docker data store from the system disk to the Mount disk/data directory

Docker info

The default Docker storage location is under/var/lib



MV Docker/data

Ln-s/data/docker Docker

Start the Docker service

Systemctl Start Docker.service

1) Creating Data containers

Docker create \
-v/opt/prometheus/data \
-v/opt/consul-data \
-v/var/lib/mysql \
-v/var/lib/grafana \
--name pmm-data \

2) Create PMM server container

Docker run-d \
-P 80:80 \
--volumes-from pmm-data \
--name pmm-server \
--restart always \ percona/pmm-server:1.0.7

3 Browser Input Server ip:

Query analytics into the analysis page

Metrics monitor into the monitoring page

The default logon username and password are admin

2. Install PMM Client on and

1) Install PMM Client

Yum Install

Yum Install Pmm-client

2) Connect PMM Server

Executed on the client server,

Pmm-admin config--server

The client name defaults to the host name, or it can define--client-name dummy_name

Client address default is native IP

Can perform pmm-admin config--help view Help

3) Add data collection Policy

Execute first on Master

Pmm-admin add MySQL--user=root--password=12345678--socket=/data/mysql/3306/mysql.sock--create-user-- Create-user-password= "pmm&2017"

Pmm-admin command

Add added

MySQL monitoring type (includes system metrics, MySQL metrics, and query analytics, you can also specify specific linux:metrics or mysql:metrics)

You can add the name of the monitor server after the monitoring type without adding the default is hostname

can perform pmm-admin add--help view Help

Removing: pmm-admin remove MySQL

After execution, create a default user PMM, and grant certain permission to collect information

3) executed on the slave

Pmm-admin add MySQL--user=pmm--password=pmm&2017--socket=/data/mysql/3306/mysql.sock

The user and password here were previously created by master, synchronized to Slave, so slave to collect information through the same users

3. Login Monitor Page

Browser input Server ip:

Enter the default username password: admin

Official Installation Documentation: Https://

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.