zabbix2.4.5 comes with MySQL monitor

Source: Internet
Author: User


First, the relevant instructions

The production line uses the Zabbix 2.4.5 to monitor all business and system networks, of course, also need to monitor the MySQL database related information, Zabbix with the MySQL monitoring template can monitor MySQL, this article in the Zabbix 2.4.5 version, Other versions please experiment on your own.

Second, configure the MySQL to monitor

1, first authorized to let Zabbixagent connect the database:
Log in to MySQL as MySQL Roott

$mysql-uroot-p123456-e "GRANT USAGE on * * to ' zabbixagent ' @ ' localhost ' identified by ' zbbixagent '"; $GRANT usage,proces S,super,replication client,replication SLAVE on * * to ' zabbixagent ' @ ' localhost ' identified by ' zabbixagent '; $flush privileges;

Or:

#mysql-uroot-p-E "GRANT USAGE on *. * to ' zabbixagent ' @ ' localhost ' identified by ' zabbixagent '"

2. Add MySQL configuration file
Vim/etc/zabbix/.my.cnf

#Zabbix agent[mysql]host=localhostuser=zabbixagentpassword=zabbixagentsocket=/data1/mysqldb/mysql/mysql.sock[ Mysqladmin]host=localhostuser=zabbixagentpassword=zabbixagentsocket=/data1/mysqldb/mysql/mysql.sock

Note:socket   specifically put there, please modify the path before viewing cat/etc/my.cnf

Third, modify/etc/zabbix/zabbix_agent.conf
Modify the following:
Unsafeuserparameters=1
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/

Four, modify MySQL template parameters
Zabbix- 2.4.4 with the MySQL template, the default is placed in/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
need to put home=/var/lib/zabbix      Replace with: Home=/etc/zabbix
, $s/\/var\/lib/\/etc/g (full replacement of vim command line mode)
Restart Zabbix_agent
#service Zabbix_agent Restart

If you cannot plot or appear   not supported     to Zabbix server tail-f/var/log/zabbix/ Zabbix_server.log
27659:20150428:111248.007 error reason for "ydnwy-01:mysql.status[uptime]" changed:received Value [ERROR 2002 (HY000):
 can ' t connect to local MySQL server through socket '/data1/mysqldb/mysql/mysql.sock ' ( ]
 is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
Similar error stating monitoring side Mysql.sock access problem, please Check permissions or

#ln-S/data1/mysqldb/mysql/mysql.sock/var/lib/mysql/mysql.sock

V. Refer to the following documents

http://lihuipeng.blog.51cto.com/3064864/1558971

This article is from the "Learning, learning" blog, please be sure to keep this source http://dyc2005.blog.51cto.com/270872/1943405

zabbix2.4.5 comes with MySQL monitor

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.