[ZBX-23208] Mariadb replication with zabbix agent 2 Created: 2023 Aug 04  Updated: 2024 Feb 14  Resolved: 2023 Aug 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Stefano Passiatore Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I've followed this instructions to configure mysql (mariadb) plugin with Zabbix agent 2: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mysql_agent2?at=release/5.4

 

Replication discovery doesn't work and I got this error: Cannot fetch data: Error 1227: Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation.

 

I've configured according to instruction with these macros:

  • {$MYSQL.DSN} => unix:/run/mysqld/mysqld.sock
  • {$MYSQL.USER} => zbx_monitor
  • {$MYSQL.PASSWORD} => *******

No edits on /etc/zabbix/zabbix_agent2.d/plugins.d/mysql.conf file.

Monitoring user has "REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW" privileges and doesn't working. I've tried also to set SUPER and REPLICATION SLAVE privileges but I still got error.

I've MariaDB 10.11. Any suggestion?

Thanks

Stefano



 Comments   
Comment by Stefano Passiatore [ 2023 Aug 04 ]

I've Zabbix Server 5.4

Comment by Stefano Passiatore [ 2023 Aug 04 ]

Ok, resolved with:

  • {$MYSQL.DSN} => /run/mysqld/mysqld.sock

But I think was correct as before...

Stefano

Comment by Marcel Turansky [ 2023 Dec 10 ]

correct, many this working but replication status not. Give error need SUPER, SLAVE MONITOR privilegies but after add privileges nothing change. I change DSN to "localhost" and replication status start working...

zabbix-server 5.4.12

zabbix-agent2 5.4.12 with mariadb 10.6.15

Comment by Arkadiusz Rzadkowolski [ 2024 Feb 14 ]

Same here on MariaDB 10.11.6

Generated at Sat Jun 21 08:15:58 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.