There should be a function tools.replag() (can MySQL tie functions to a database?) that provides the replication lag in seconds, and maybe another function tools.lastrepupdate() that returns "NOW() - replag()".
It should be a "SECURITY DEFINER" function that queries "SHOW SLAVE STATUS.Seconds_Behind_Master" (cf. mediawiki/core:includes/db/DatabaseMysql.php). This is preferable to the Toolserver method of querying recentchanges as it gives a more accurate picture of the actual replication lag. http://stackoverflow.com/questions/1570776/how-to-access-seconds-behind-master-from-sql has some information that this query should be possible, though not trivial.
Version: unspecified
Severity: normal