用percona monitoring plugins 监控mysql

下载:http://www.percona.com/redir/downloads/percona-monitoring-plugins/1.1.1/percona-zabbix-templates-1.1.1-1.noarch.rpm

安装:rpm -ivh percona-zabbix-templates-1.1.1-1.noarch.rpm 

安装php php-mysql

将定义key的子配置复制到/usr/local/zabbix/zabbix_agentd.conf.d/下

cp /var/lib/zabbix/percona/templates/luserparameter_percona_mysql.conf /usr/local/zabbix/zabbix_agentd.conf.d/

重启zabbix_agentd

service zabbix_agentd restart

修改脚本中的用户名和密码

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

修改mysql_user和mysql_pass(mysql中存在的用户)

给权限

grant process,super,select on *.* to zabbix@localhost identified by ‘zabbix‘;

flush privileges;

对脚本进行调试

 /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh gg

把/var/lib/zabbix/percona/templates目录下面的xml 导入到模版里面(配置-模版-载入)

将模版应用于主机

monitoring-graphs ,查看图形。

 

用percona monitoring plugins 监控mysql

上一篇:Role-based access control modeling and auditing system


下一篇:SonarQube环境搭建以及java代码扫描基础用法