每一个需要监控的主机或者数据库服务器,都需要安装pmm client,安装需要root或者sudo权限。
一、pmm client 安装
1、确保要监控的机器和pmm server之间的网络是通的,本例的pmm sever IP是192.168.75.110
[root@sit_mysql1 ~]# ping 192.168.75.110
2、安装pmm client,这里用yum安装,先安装percona源,再安装pmm client
[root@sit_mysql1 ~]# rpm -ivh https://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
[root@sit_mysql1 ~]# yum install pmm-client
3、添加Linux服务器监控
[root@sit_mysql1 ~]# pmm-admin config --server 192.168.75.110
4、添加mysql 监控
[root@sit_mysql1 ~]# pmm-admin config mysql
OK, PMM server is alive.
PMM Server | 192.168.75.110
Client Name | sit_mysql1.ewt.mst
Client Address | 192.168.75.111
5、添加mongodb监控
[root@sit_mysql1 ~]# pmm-admin config mongodb
OK, PMM server is alive.
PMM Server | 192.168.75.110
Client Name | sit_mysql1.ewt.mst
Client Address | 192.168.75.111
5、查看被监控的内容:
[root@sit_mysql1 ~]# pmm-admin list
6、删除监控服务:
pmm-admin rm
网友评论