Percona Monitoring and Management (PMM) - Getting Started

Foreword

Database monitoring tools most commonly used is the zabbix, data collection zabbix able to show up graphically, and timely warning by setting a threshold. Zabbix can handle text to die for, say sql database crawl running, the zabbix can not do anything. If sql performed within this period of time, commonly used means to see, we can pull oracle for some time awr report analysis, there is no similar analysis mysql and mongodb, only to slow the log inside Amoy. Next introduce a monitoring tool for mysql, mongodb of (PMM).
(PMM) is an open-source open-source platform for managing and monitoring the performance of MySQL and MongoDB, collected by PMM client DB monitoring data with third-party software Grafana drawing displayed. PMM addition to monitoring indicators database system and some outside, but also to show slow log database within a specified time frame, similar to Oracle in the AWR SQL ordered by Elapsed Time.
Tell me what network interface demo can: https://pmmdemo.percona.com/graph/

Installation

pmm pmm-server and divided pmm-agent. pmm-server deployed on a separate machine, pmm-agent deployed on the monitored machine. Here is the official online presentation pmm architecture.

3

end server

Installation way using docker, I used here is the environment centos7 (recommended centos7)

关闭防火墙和selinux
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

安装docker
yum install docker -y

Start Docker
Service Docker Start

Download the latest image file
docker pull percona / pmm-server: latest

View Mirror
docker tag percona / pmm-server percona / pmm-server: 1.1.1 # copy percona / pmm-server: latest mirror and renamed Percona / PMM-Server: 1.1.1
Docker ImagesRF Royalty Free

创建容器
docker create \
   -v /opt/prometheus/data \
   -v /opt/consul-data \
   -v /var/lib/mysql \
   -v /var/lib/grafana \
   --name pmm-data \
   percona/pmm-server:1.1.1 /bin/true

启动容器
docker run -d \
   -p 8080:80 \
   --volumes-from pmm-data \
   --name pmm-server \
   --restart always \
   percona/pmm-server:1.1.1

View container runs
docker ps

pmm-agent terminal

Download pmm-client (https://www.percona.com/downloads/pmm/), download the rpm package or binary package will do, I used here is a binary package

4
Agent-installed PMM
the tar-1.17.1.tar.gz -zxvf PMM-Client
CD-PMM-Client 1.17.1
./install

Server connection PMM
./pmm-admin --server 10.40.16.60:8080 # config ip address is 10.40.16.60 pmm-server of
increase MySQL monitoring service
to create a monitoring user, the user can also use an existing
SQL> grant all on . * * to monitor @ '%' IDENTIFIED by 'monitor';
./pmm-admin the Add monitor MySQL --user --password monitor --host 10.30.10.50 #host ip address is being monitored machine

View monitor status
./pmm-admin list

Landing page

Go to the browser is open http://10.40.16.60:8080 # 10.40.16.60 ip address of pmm-server
appears below the interface, the next step is to see a variety of indicators, go explore, there are problems we welcome message

5

Guess you like

Origin www.cnblogs.com/ddzj01/p/10986359.html