码迷,mamicode.com
首页 > 数据库 > 详细

zabbix monitor mysql

时间:2015-01-26 17:32:30      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:mysql   monitor   zabbix   监控mysql   

1grant user for mysql

GRANT USAGE ON *.* TO ‘zabbix‘@‘localhost‘ IDENTIFIED BY "zabbix";

2touch /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

3cp 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

4vim /etc/zabbix/zabbix_agentd.com

Include=/etc/zabbix/zabbix_agentd.d/

5/etc/init.d/zabbix_agentd restart

6zabbix_get -s 127.0.0.1 -k mysql.status[Com_begin]

7Apply Template App MySQL


本文出自 “ThunderMeng” 博客,请务必保留此出处http://thundermeng.blog.51cto.com/9414441/1608322

zabbix monitor mysql

标签:mysql   monitor   zabbix   监控mysql   

原文地址:http://thundermeng.blog.51cto.com/9414441/1608322

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!