Permalink
Browse files

Switch heartbeat support from maatkit to Percona Toolkit.

  • Loading branch information...
1 parent 22d236f commit 4529f7e53593be2cfdb9153bab828b0d5dc74bde Bret Martin committed Nov 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mysql-snmp
View
@@ -735,7 +735,7 @@ sub fetch_mysql_data {
# Check replication heartbeat, if present.
if ( $opt{heartbeat} ne '' ) {
- my $row2 = $dbh->selectrow_arrayref("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1) FROM $opt{heartbeat} WHERE id = 1");
+ my $row2 = $dbh->selectrow_arrayref("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1) FROM $opt{heartbeat} WHERE server_id != \@\@SERVER_ID ORDER BY ts DESC LIMIT 1");
$status{'slave_lag'} = $row2->[0];
}

0 comments on commit 4529f7e

Please sign in to comment.