A detailed tutorial on monitoring MySQL with templates in Zabbix3.2.6
The following is a detailed tutorial on monitoring MySQL with templates in Zabbix3.2.6. The secret of the text is to be close to the topic. So, no gossip, let's go straight to the following, I believe that after reading the detailed tutorial of Zabbix3.2.6 's own template monitoring MySQL, you will certainly benefit.
1. The client creates an account for querying data.
Mysql > GRANT USAGE ON *. * TO 'zabbix'@'localhost' IDENTIFIED BY' zabbix'
2. Configure userparameter_mysql.conf
Enter the zabbix source package path to copy, or you can download it from the attachment to this blog.
Cd zabbix-3.2.6/conf/zabbix_agentd/cp userparameter_mysql.conf / etc/zabbix/zabbix_agentd.conf.d/
3. Add the configuration file my.cnf used to associate the mysql, and modify the mysql path in the template configuration file
Cd / etc/zabbix/vim .my.cnf
# Zabbix Agent
[mysql] host=localhostuser=zabbixpassword=zabbixsocket=/var/lib/mysql/ mysql.sock[mysqladmin] host=localhostuser=zabbixpassword=zabbixsocket=/var/lib/mysql/mysql.sock
4. Modify userparameter_mysql.conf
Sed-I's accounqqvar _ etc/zabbix/zabbix_agentd.conf.d/userparameter_mysql.conf _
5. Modify the zabbix_agentd.conf file and add the following line
Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
6. Restart zabbix_agentd
Service zabbix_agentd restart
7. Testing
. / zabbix_get-s 10.0.1.13-k mysql.pingsh: mysqladmin: command not found0
Note: if an error is reported during the test: sh: mysql: command not found,sh: mysqladmin: command not found, modify the path of the mysql,mysqladmin command in userparameter_mysql.conf and use the absolute path.
8. Configure the Zabbix WEB interface
9. Data output
Is there anything you don't understand about the detailed tutorials of monitoring MySQL with templates in Zabbix3.2.6 above? Or if you want to know more about it, you can continue to follow our industry information section.