percona监控MySQL


percona为MySQL制作了专用插件,监控项,模版,图形。zabbix server端版本为 3.0 .7,之前已经介绍过安装步骤,这里不再做说明,请参考 http: //www.cnblogs.com/Csir/p/6753412.html

主机

#agent端
[root@db02 ~]# hostname ;hostname -I
db02
10.0.0.52 172.16.1.52 
#server端
[root@zabbix ~]# hostname;hostname -I 
zabbix
10.0.0.120 172.16.1.120

环境

[root@db02 ~]# cat /etc/redhat-release 
CentOS release 6.8 (Final)
[root@db02 ~]# /etc/init.d/iptables status
iptables: Firewall is not running.
[root@db02 ~]# getenforce 
Disabled

zabbix-agent

1.安装zabbix-agent以及percona相关包

yum install zabbix-agent php php-mysql -y
rpm -ivh https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.7/binary/redhat/6/x86_64/percona-zabbix-templates-1.1.7-2.noarch.rpm
percona相关文件如下
[root@db02 percona]# pwd
/var/lib/zabbix/percona
[root@db02 percona]# tree
.
├── scripts
│   ├── get_mysql_stats_wrapper.sh
│   └── ss_get_mysql_stats.php
└── templates
    ├── userparameter_percona_mysql.conf
    └── zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.7.xml

2.复制配置文件

chown -R zabbix.zabbix /var/lib/zabbix/percona/
mkdir -p /var/lib/mysql
ln -s /application/mysql/data/mysql.sock /var/lib/mysql/mysql.sock
cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/
/etc/init.d/zabbix-agent restart

3.在Agent节点上配置和验证与127.0.0.1的MySQL连接

注意事项

1、tmp etc var/lib/zabbix  必须有zabbix权限

2,server 测试zabbix_get -s 172.16.6.62 -I 172.16.3.3 -k  MySQL.Questions


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值