First, Zabbix3.2.6 use the self-brought template to monitor MySQL
Add Zabbix_agent Client Method: http://www.cnblogs.com/lei0213/p/8858269.html
MySQL server-side configuration
1, need to know:
1, if you want to monitor MySQL or mariadb database, first you have to ensure that the normal operation of the server, so the first need to monitor this Linux server, if you add Linux monitoring, you can view my previous blog post.
2, the database needs authorization.
Mysql>grant USAGE on *. * to ' Zabbix ' @ ' localhost ' identified by ' Zabbix ';
3, configuration userparameter_mysql.conf (here need to download Zabbix client installation package, in fact, the server installation can be)
CD ZABBIX-3.2.6/CONF/ZABBIX_AGENTD/CP userparameter_mysql.conf/etc/zabbix/zabbix_agentd.conf.d/
4. Add the configuration file my.cnf that is used to correlate MySQL, and modify the MySQL path in the template configuration file
Cd/etc/zabbix/vim. my.cnf
5. mysql configuration file my.cnf Add or change the following password
#user =zabbix Authorized User
#password =zabbix Authorized User Password
#soket =soket storage location, absolute path
[mysql]host=localhostuser=zabbixpassword=zabbixsocket=/var/lib/mysql/mysql.sock[mysqladmin]host=localhostuser= Zabbixpassword=zabbixsocket=/var/lib/mysql/mysql.sock
When you are finished, restart the MySQL database server to see if it works.
4, modify the userparameter_mysql.conf
Change/var/lib/zabbix in/etc/zabbix/zabbix_agentd.conf.d/userparameter_mysql.conf configuration file to/etc/zabbix
Sed-i ' [email protected]/var/lib/[email protected]/etc/[email protected] '/etc/zabbix/zabbix_agentd.conf.d/ Userparameter_mysql.conf
5, modify the zabbix_agentd.conf file, add the following line
Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
6, restart MySQL, agentd service
Zabix-server-side configuration
Note that I am here to monitor the proxy way
1. Create a MySQL monitoring group
2. Add Monitoring Host
3. Adding monitoring templates
4. View
Reference to: http://blog.51cto.com/wzlinux/1944741
CENTOS7 's Zabbix monitoring MySQL (mariadb) database