Zabbix3.0.3 Monitor single host MySQL status state

Source: Internet
Author: User

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

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.