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