Zabbix Monitoring of enterprise-class MySQL master and slave

Source: Internet
Author: User

1. What metrics are monitored for MySQL master and slave monitoring?

According to the thread condition of slave_sql_running and slave_io_running to judge the master-slave situation, the number of Yes is 2 when the master-slave is normal

2. Set up shell and MySQL to better interact with MySQL's password-free login

[MySQL]

Host=localhost

User=zabbix

Password=password

[Mysqladmin]

Host=localhost

User=zabbix

Password=password

3. How do I get the number of Yes for two threads?

Mysql-e "show Slave Status\g" | Grep-e "Slave_sql_running| Slave_io_running "|awk ' {print $} ' | Grep-c Yes

4. Setting up a monitoring template in the Zabbix agent

The style of the template is as follows:

userparameter= custom Key,command or shell scripts

Agent template Zabbix_agentd.d in the Zabbix directory

Vim userparameter_my.conf

Cat userparameter_my.conf

Userparameter=replication,mysql-e "show Slave Status\g" | head-15 | Grep-e "Slave_io_running| Slave_sql_running "| awk ' {print $} ' | Grep-c Yes

5.zabbix web-side creation of monitoring templates

Configuration ------> Templates --------> Create a template

Adding monitoring items

Create an icon to add a monitor item

View icon

6. Prepare to update a topic on Zabbix monitoring, Welcome to join our Linux Technology Exchange Group: 642921645, we do not regularly update a lot of information about the system operations in the group, look forward to your joining!

Zabbix Monitoring of enterprise-class MySQL master and slave

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.