Thursday, November 12, 2020

Add MySQL machine on Zabbix Monitoring

Description: Here I have explained, How add MySQL Service on Zabbix 

Procedure: 

  • Download MySQL template in Zabbix from below URL and Import it on Zabbix
           https://www.zabbix.com/integrations/mysql

  • Once you import template, link MySQL template with host from Configuration tab 


  • Install Zabbix-client and MySQL client on Host machine 
  • Download MySQL template file from below URL and paste it to /etc/zabbix/zabbix_agentd.d/ 
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mysql_agent/template_db_mysql.conf
  • Create MySQL user for monitoring using below command
  CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>';
  GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';
  • Create .my.cnf under /var/lib/zabbix/  and define username  password as follow
    [client]
    user=zbx_monitor
    password=<password>
  • Once file created restart zabbix-agent service and verify monitoring dashboard and host. You will get data under mysql graphs 




No comments:

Post a Comment