Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21462

Issue monitoring Mysql with zabbix-agent2

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Commercial support required
    • 6.2.1
    • None
    • Agent2 plugin (N)
    • Ubuntu 20.04.2
      Mysql 8.0.30
      Zabbix-Agent2 6.2.1
      Zabbix-Server 6.2
      Template MySQL by Zabbix agent 2

    Description

      Steps to reproduce:

      After installing the template MySQL by Zabbix agent 2 on my zabbix server 6.2 it doesnt works.

      I've two servers in my enviroment, zabbix principal frontend and a zabbix proxy (all the hosts pass trough the proxy)

       

      i`ve a recurrent message: Cannot fetch data: Error 1045: Access denied for user 'zbx_monitor'@'localhost' (using password: YES).

       

      I explain how configure the template and data like the instruccions of the template:

      1. Create MySQL user for monitoring (<password> at your discretion):

       

      CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>';

      GRANT REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON . TO 'zbx_monitor'@'%';

      mysql> show GRANTS FOR 'zbx_monitor'@'%';
      ------------------------------------------------------------------------------------------
      | Grants for [email protected]%                                                                 |
      ------------------------------------------------------------------------------------------
      | GRANT PROCESS, SHOW DATABASES, REPLICATION CLIENT, SHOW VIEW ON . TO `zbx_monitor`@`%` |
      ------------------------------------------------------------------------------------------
      1 row in set (0,00 sec)

      {{}}

      1. Set on the mysql.conf inside /etc/zabbix/zabbix_agent2.d/plugins.d/mysql.conf
        1. Plugins.Mysql.Sessions.mysqld.Uri=unix:/var/run/mysqld/mysqld.sock
        2. Plugins.Mysql.Sessions.mysqld.User=zbx_monitor
        3. Plugins.Mysql.Sessions.mysqld.Password="PASSWORD" 

      i asuming that its not necessary to declare userparameter in the configuration file, because if i make it, the agent crash

      cannot initialize user parameters: cannot register user parameter "mysql.ping[*], mysqladmin -h"$1" -P"$2" ping": key already used

       

      Ok, after that i assign the template to my example host.

      Recharge the configuration cache of my proxy.

       

      And zabbix show me the message of the issue all the time, it doesnt matter if i change the permissions on mysql, if i declare de macro data on the template (user,password, DSN). I dont know what to do.

       

      Help me please!

      Attachments

        Activity

          People

            zabbix.support Zabbix Support Team
            JorgeSach Jorge Sachocos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: