美文网首页
Zabbix系列之(八):使用Percona Monitorin

Zabbix系列之(八):使用Percona Monitorin

作者: 小六的昵称已被使用 | 来源:发表于2019-05-12 09:50 被阅读0次

环境

[root@centos181001 ~]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core) 

[root@centos181001 ~]# zabbix_server -V
zabbix_server (Zabbix) 4.0.5
Revision 90164 25 February 2019, compilation time: Feb 25 2019 09:41:55

Copyright (C) 2019 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013

[root@centos181001 ~]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 4.0.5
Revision 90164 25 February 2019, compilation time: Feb 25 2019 09:42:17

Copyright (C) 2019 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013

第一步:被监控端设置

1.下载并安装Percona Monitoring Plugins

wget https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.8/binary/redhat/7/x86_64/percona-zabbix-templates-1.1.8-1.noarch.rpm
rpm -ivh percona-zabbix-templates-1.1.8-1.noarch.rpm

Scripts are installed to /var/lib/zabbix/percona/scripts
Templates are installed to /var/lib/zabbix/percona/templates

2.被监控端安装依赖

yum install -y php php-mysql

3.COPY配置文件到Zabbix agent目录

cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/

4.填写账户信息

vi /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php

$mysql_user = 'cactiuser';
$mysql_pass = 'cactiuser';

5.重启Agent

systemctl restart zabbix-agent.service

第二步:Zabbix Server设置

1.导入模板

## 模板在以下位置
/var/lib/zabbix/percona/templates

登录Zabbix Server网页
    配置 - 模板 - 导入 - 选择文件

## 安装后的模板在使用的时候有点问题,这里有修正了以后的下载地址
https://pan.baidu.com/s/1z0yAQFQlrcQuMCzDzduR_Q
b28k

第三步:使用

将需要监控的MySQL添加此模板监控即可。

附录:

Percona Monitoring Plugins下载地址:https://www.percona.com/downloads/percona-monitoring-plugins/

安装说明:https://www.percona.com/doc/percona-monitoring-plugins/1.1/zabbix/index.html

相关文章

网友评论

      本文标题:Zabbix系列之(八):使用Percona Monitorin

      本文链接:https://www.haomeiwen.com/subject/pygqaqtx.html