This section contains the required steps to ensure proper operation of Template DB MySQL, developed for monitoring DBMS MySQL and its forks (such as MariaDB etc.).
1. Install Zabbix agent and MySQL client.
If necessary, add the path to the
mysqladmin utilities to the global environment variable PATH.
2. Copy the
template_db_mysql.conf file (found in the templates directory of the downloaded latest Zabbix version) into folder with Zabbix agent configuration (/etc/zabbix/zabbix_agentd.d/ by default). Don't forget restart Zabbix agent.
3. Create MySQL user for monitoring (choose your own <password>). For example:
CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>'; GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';
For more information, please see MYSQL documentation.
.my.cnf in the home directory of Zabbix agent for Linux (/var/lib/zabbix by default ) or
my.cnf in c:\ for Windows. The file must have three strings:
[client] user=zbx_monitor password=<password>
template_db_mysql.xml in to Zabbix and link it to the target host.