MySQL cluster replication monitoring with collectd/mysql is possible by configuring the following elements:
MasterStats, SlaveStats, and SlaveNotifications options as described in 10-mysql.conf. In this particular case, you're interested in setting the SlaveStats, and SlaveNotifications in the Smart Agent's configuration for the host that acts as a slave. This can be also achieved by setting collectd/customExample 10-mysql.conf:
<LoadPlugin "mysql"> Interval 10 </LoadPlugin> <Plugin mysql> <Database "test">ReportHost false Host "<hosts_IP>" Port <port> Database "<monitored_database_name" User "<account_set_for_monitoring>" Password "<password>" SlaveStats true SlaveNotifications true </Database> </Plugin>
CREATE USER '<account_set_for_monitoring>'@'localhost' IDENTIFIED BY '<password>';-- Give appropriate permissions
-- ("GRANT USAGE" is synonymous to "no privileges")
GRANT USAGE ON *.* TO '<account_set_for_monitoring>'@'localhost';
-- Permissions for the MasterStats and SlaveStats options
GRANT REPLICATION CLIENT ON *.* TO '<account_set_for_monitoring>'@'localhost';Along with the metrics listed in integrations MySQL. there will be an additional metric called time_offset made available. This will show the actual Seconds_Behind_Master value listed by calling SHOW SLAVE STATUS on the MySQL node.
NOTE: this one is documented on the collectd\wiki site however it has been tested.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
29-Sep-2026
|
Initial Release |