centos7 Percona Monitoring and Management

服务端

下载PMM Server Docker镜像

docker pull percona/pmm-server:1.1.1
# 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/true2)启动

# docker run -d  \
  -p 808:80 \
  --volumes-from pmm-data \
  --name pmm-server \
  --restart always \
  percona/pmm-server:1.1.1

客户端

wget -c https://www.percona.com/downloads/pmm-client/pmm-client-1.1.1/binary/tarball/pmm-client-1.1.1.tar.gz
tar -xf pmm-client-1.1.1.tar.gz
cd pmm-client-1.1.1/
./install

连接PMM Server
pmm-admin config --server 192.168.0.60:808

OK, PMM server is alive.

PMM Server      | 192.168.0.60:808 
Client Name     | localhost.localdomain
Client Address  | 192.168.0.60 

增加MySQL监控服务

pmm-admin add mysql --user admin --password 123456--host 192.168.0.60           
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN admin:***@tcp(192.168.0.60:3306)
[mysql:queries] OK, now monitoring MySQL queries from perfschema using DSN admin:***@tcp(192.168.0.60:3306)

查看
pmm-admin list

 pmm-admin list
pmm-admin 1.1.1

PMM Server      | 192.168.0.60:808 
Client Name     | localhost.localdomain
Client Address  | 192.168.0.60 
Service Manager | linux-systemd


-------------- ---------------------- ----------- -------- ----------------------------------- ------------------------
SERVICE TYPE   NAME                   LOCAL PORT  RUNNING  DATA SOURCE                         OPTIONS                 
-------------- ---------------------- ----------- -------- ----------------------------------- ------------------------
mysql:queries  localhost.localdomain  -           YES      admin:***@tcp(192.168.0.60:3306)  query_source=perfschema 
linux:metrics  localhost.localdomain  42000       YES      -                                                           
mysql:metrics  localhost.localdomain  42002       YES      admin:***@tcp(192.168.0.60:3306)  
      

centos7 Percona Monitoring and Management_第1张图片
--------------------end

你可能感兴趣的:(linux常用基础技能及服务,#,pmm,Percona,Monitoring,Management)