zabbix monitor mysql
1、grant user for mysql
GRANT USAGE ON *.* TO ‘zabbix‘@‘localhost‘ IDENTIFIED BY "zabbix";
2、touch /var/lib/zabbix/.my.cnf
# Zabbix Agent
[mysql]
host=localhost
user=zabbix
password=zabbix
socket=/tmp/mysql.sock
[mysqladmin]
host=localhost
user=zabbix
password=zabbix
socket=/tmp/mysql.sock
3、cp userparameter_mysql.conf /etc/zabbix/zabbix_agentd.d/
HOME=/var/lib/zabbix #where store mysql grant user info ,after it mysql is mysql command full path
4、vim /etc/zabbix/zabbix_agentd.com
Include=/etc/zabbix/zabbix_agentd.d/
5、/etc/init.d/zabbix_agentd restart
6、zabbix_get -s 127.0.0.1 -k mysql.status[Com_begin]
7、Apply Template App MySQL
本文出自 “ThunderMeng” 博客,请务必保留此出处http://thundermeng.blog.51cto.com/9414441/1608322
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。