Zabbix Documentation 4.4

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:config:templates_out_of_the_box:requirements:mysql

Requirements for MySQL template

Overview

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.).

The template doesn't support the monitoring the multi-master replications.

Steps

1. Install Zabbix agent and MySQL client.

If necessary, add the path to the mysql and 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.

4. Create .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>

5. Import template_db_mysql.xml in to Zabbix and link it to the target host.