scoutapp/scout-plugins — pull request #74 by cgriego (2012-12-13 17:07:28+00:00)
Title: Always report the MySQL Seconds_Behind_Master if available

We had a situation where a replication error caused replication to halt. MySQL reported Slave_IO_Running=Yes, Slave_SQL_Running=No, and Seconds_Behind_Master began climbing. When this happened, Scout issues a single alert for "Replication not running" which we lost in our current noise level of email alerts. Scout also stopped reporting the Seconds Behind Master which we have tied to triggers for email and SMS alerts, so neither were triggered. Inspecting the Scout UI for the servers showed "Seconds behind master: 0.0" and that the plugin as in an "OK" state.

This change always reports Seconds Behind Master is a non-NULL value is available, allowing user configured triggers to fire.