-
Problem report
-
Resolution: Commercial support required
-
Trivial
-
None
-
6.2.1
-
Ubuntu 20.04.2
Mysql 8.0.30
Zabbix-Agent2 6.2.1
Zabbix-Server 6.2
Template MySQL by Zabbix agent 2
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:
- 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 zbx_monitor@% |
------------------------------------------------------------------------------------------
| GRANT PROCESS, SHOW DATABASES, REPLICATION CLIENT, SHOW VIEW ON . TO `zbx_monitor`@`%` |
------------------------------------------------------------------------------------------
1 row in set (0,00 sec)
{{}}
- Set on the mysql.conf inside /etc/zabbix/zabbix_agent2.d/plugins.d/mysql.conf
-
- Plugins.Mysql.Sessions.mysqld.Uri=unix:/var/run/mysqld/mysqld.sock
- Plugins.Mysql.Sessions.mysqld.User=zbx_monitor
- 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!