I know I can use a UserParameter to get the replication delay, but it can either be "NULL" to indicate that replication is not working (which needs to fire a trigger), or a non-negative integer (which needs to fire a trigger if it exceeds a given number). How can I do this properly?
Ad Widget
Collapse
Template for MySQL replication backlog?
Collapse
X
-
Tags: None
-
write a script that connects to the database, executes a "SHOW STATUS" to get the "Slave_running" field (http://dev.mysql.com/doc/refman/5.1/...variables.html ) and one that does the same with "SHOW SLAVE STATUS" (http://dev.mysql.com/doc/refman/5.0/...ve-status.html) to get "Seconds_Behind_Master"
then configure those scripts as UserParameter. -
Actually, my concern is how I should properly treat the "NULL" value, which indicates that replication is disabled. I saw a suggestion in another thread to replace that with a value of 99999, though I would use a much larger number (99999 seconds is only a little longer than 24 hours).Comment
Comment