1, first of all, need an account to get status information
1.1 Authorize an ordinary user, can login into MySQL using the-e parameter show status get
1.2 can also use mysqladmin extended-status to obtain
2, add a section to the scheduled task, as follows:
*/1 * * * */usr/bin/mysql-u user-h127.0.0.1-p password-e ' show status; ' >/tmp/.mysql-status.txt
3, add a key information in the ZABBIX-AGENTD, or add it in the ZABBIX_AGENTD.CONF.D directory, if you need to add it to the ZABBIX_AGENTD.CONF.D in the configuration file, add the following:
#mysql
Userparameter=mysql.status[*],awk '/$1\>/{print $$2} '/tmp/.mysql-status.txt
4, Import Template
http://pan.baidu.com/share/init?shareid=607458431&uk=1074693321
Link Password: 0tb1
Basically you can monitor it! As follows:
Description
The scheduled task is executed every minute, and the imtes item in Zabbix is also fetched every minute, which means that the value you see may be delayed >=2 minutes